sean Sun Jan 23 20:12:30 2005 EDT
Modified files:
/phpdoc/en/language/oop5 basic.xml
Log:
rollback "batman's" commit to english
http://cvs.php.net/diff.php/phpdoc/en/language/oop5/basic.xml?r1=1.10&r2=1.11&ty=u
Index: phpdoc/en/language/oop5/basic.xml
diff -u phpdoc/en/language/oop5/basic.xml:1.10
phpdoc/en/language/oop5/basic.xml:1.11
--- phpdoc/en/language/oop5/basic.xml:1.10 Sun Jan 23 17:55:51 2005
+++ phpdoc/en/language/oop5/basic.xml Sun Jan 23 20:12:29 2005
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<sect1 id="language.oop5.basic">
- <title>Z�klady</title>
+ <title>The Basics</title>
<sect2 id="language.oop5.basic.class">
<title>class</title>
<para>
- Ka�d� defin�cia triedy za��na k���ov�m slovom class nasledovan� n�zvom
- triedy, ktor� je �ubovo�n�, s v�nimkou
- <link linkend="reserved">rezervovan�ch</link> slov v PHP. Nasleduje p�r
- zlo�en�ch z�tvoriek, ktor� obsahuj� defin�ciu vlastnost� a met�d triedy.
- V ka�dej met�de, okrem <link
linkend="language.oop5.static">statick�ch</link>,
- je dostupn� pseudo premenn� <varname>$this</varname>.
<varname>$this</varname>
- je referencia na t� ist� in�tanciu, z ktorej bola met�da volan�.
+ Every class definition begins with the keyword class, followed by a class
+ name, which can be any name that isn't a <link
linkend="reserved">reserved</link>
+ word in PHP. Followed by a pair of curly braces, of
+ which contains the definition of the classes members and methods. Within
+ each method, except for <link linkend="language.oop5.static">static</link>
+ methods, a pseudo variable <varname>$this</varname> is available.
+ <varname>$this</varname> is a reference to the same instance that
+ called the method.
</para>
<example>
- <title>Jednoduch� defin�cia triedy</title>
+ <title>Simple Class definition</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -39,14 +40,14 @@
<sect2 id="language.oop5.basic.new">
<title>new</title>
<para>
- Na vytvorenie in�tancie objektu, mus� by� vytvoren� nov� objekt a priraden�
- premennej. Ak sa vytv�ra nov� objekt, v�dy je priraden� premennej, s
jedinou
- v�nimkou, a to ak objekt obsahuje <link
linkend="language.oop5.decon">kon�truktor</link>,
- v ktorom je definovan� <link linkend="language.exceptions">v�nimka</link>,
- vracaj�ca chybu.
+ To create an instance of an object, a new object must be created and
+ assigned to a variable. An object will always be assigned when
+ creating a new object unless the object has a
+ <link linkend="language.oop5.decon">constructor</link> defined that throws
an
+ <link linkend="language.exceptions">exception</link> on error.
</para>
<example>
- <title>Vytv�ranie in�tancie</title>
+ <title>Creating an instance</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -56,14 +57,14 @@
</programlisting>
</example>
<para>
- Ak prira�ujeme u� existuj�cu in�tanciu objektu novej premennej, tak nov�
- premenn� bude pristupova� k tej istej in�tancii ako premenn�, ktorej bol
- p�vodn� objekt priraden�. Toto ist� spr�vanie je aj pri pred�van�
in�tancie
- ako parametru funkcii. Nov� in�tancia u� existuj�ceho objektu mo�e by�
- vytvoren� <link linkend="language.oop5.cloning">klonovan�m</link>.
+ When assigning an already created instance of an object to a new variable,
the new variable
+ will access the same instance as the object that was assigned. This
+ behaviour is the same when passing instances to a function. A new instance
+ of an already created object can be made by
+ <link linkend="language.oop5.cloning">cloning</link> it.
</para>
<example>
- <title>Prira�ovanie objektu</title>
+ <title>Object Assignment</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -97,20 +98,19 @@
<sect2 id="language.oop5.basic.extends">
<title>extends</title>
<para>
- Trieda m��e zdedi� met�dy a vlastnosti inej triedy pou�it�m k���ov�ho
- slova extends v deklar�cii. Nie je mo�n� dedenie z viacer�ch tried, trieda
- m��e dedi� iba z jednej z�kladnej triedy.
+ A class can inherit methods and members of another class by using the
+ extends keyword in the declaration. It is not possible to extend multiple
+ classes, a class can only inherit one base class.
</para>
<para>
- Zdeden� met�dy a vlastnosti m��u by� nahraden�, s jednou v�nimkou, a to,
ak
- je v rodi�ovskej triede definovan� met�da ako <link
linkend="language.oop5.final">final</link>,
- opakovanou deklar�ciou s t�m ist�m menom met�dy, ak� bolo pou�it� v
- rodi�ovskej triede.
- Je taktie� mo�n� pristupova� k nahraden�m met�dam alebo vlastnostiam
rodi�ovskej
- triedy, odkazovan�m sa pomocou <link
linkend="language.oop5.paamayim-nekudotayim">parent::</link>
+ The inherited methods and members can be overrided, unless the parent
+ class has defined a method as <link
linkend="language.oop5.final">final</link>,
+ by redeclaring them within the same name defined in the parent class.
+ It is possible to access the overrided method or members by
+ referencing them with <link
linkend="language.oop5.paamayim-nekudotayim">parent::</link>
</para>
<example>
- <title>Jednoduch� dedenie triedy</title>
+ <title>Simple Class Inherintance</title>
<programlisting role="php">
<![CDATA[
<?php