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:
Sean Coates 2004-12-07 19:28:42 +00:00
parent e093fea5c5
commit aa43cb1caa

View file

@ -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>