mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
elaborated on when a class may be 'broken'
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@174235 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e093fea5c5
commit
aa43cb1caa
1 changed files with 24 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.54 $ -->
|
||||
<!-- $Revision: 1.55 $ -->
|
||||
<chapter id="language.oop">
|
||||
<title>Classes and Objects (PHP 4)</title>
|
||||
|
||||
|
@ -49,7 +49,9 @@ class Cart {
|
|||
<warning>
|
||||
<simpara>
|
||||
You can <emphasis>NOT</emphasis> break up a class definition into
|
||||
multiple files, or multiple PHP blocks. The following will not work:
|
||||
multiple files. You also can <emphasis>NOT</emphasis> break a class
|
||||
definition into multiple PHP blocks, unless the break is within a method
|
||||
declaration. The following will not work:
|
||||
</simpara>
|
||||
<para>
|
||||
<informalexample>
|
||||
|
@ -64,6 +66,26 @@ class test {
|
|||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<simpara>
|
||||
However, the following is allowed:
|
||||
</simpara>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
class test {
|
||||
function test() {
|
||||
?>
|
||||
<?php
|
||||
print 'OK';
|
||||
}
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
|
Loading…
Reference in a new issue