mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Fix #37258 (typos + add a reference to class/objects functions)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@212245 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
17d1873b62
commit
427967c856
1 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
|
||||
<sect1 id="language.oop5.basic">
|
||||
<title>The Basics</title>
|
||||
|
@ -9,14 +9,14 @@
|
|||
<para>
|
||||
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
|
||||
word in PHP. Followed by a pair of curly braces,
|
||||
which contains the definition of the classes members and methods. A
|
||||
pseudo-variable, <varname>$this</varname> is available when a method is
|
||||
called from within an object context. <varname>$this</varname> is a
|
||||
reference to the calling object (usually the object to which the method
|
||||
belongs, but can be another object, if the method is called
|
||||
<link linkend="language.oop5.static">statically</link> from the context
|
||||
of a secondary object). This is illustrated in the following example:
|
||||
of a secondary object). This is illustrated in the following examples:
|
||||
<example>
|
||||
<title><varname>$this</varname> variable in object-oriented language</title>
|
||||
<programlisting role="php">
|
||||
|
@ -83,6 +83,14 @@ class SimpleClass
|
|||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
There are some nice functions to handle classes and objects. You might want
|
||||
to take a look at the <link linkend="ref.classobj">Class/Object
|
||||
Functions</link>.
|
||||
</para>
|
||||
</note>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="language.oop5.basic.new">
|
||||
|
|
Loading…
Reference in a new issue