cvs: phpdoc /en/language/oop5 interfaces.xml
| From: | Kalle Sommer Nielsen | Date: | Mon, 11 Aug 2008 22:23:58 +0000 |
| Subject: | cvs: phpdoc /en/language/oop5 interfaces.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2018@lists.php.net to get a copy of this message | ||
kalle Mon Aug 11 22:23:58 2008 UTC
Modified files:
/phpdoc/en/language/oop5 interfaces.xml
Log:
Last commit went abit too quickly, this also adds example usage of multiple inheritance + fixes
example from last commit
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/interfaces.xml?r1=1.11&r2=1.12&diff_format=u
Index: phpdoc/en/language/oop5/interfaces.xml
diff -u phpdoc/en/language/oop5/interfaces.xml:1.11 phpdoc/en/language/oop5/interfaces.xml:1.12
--- phpdoc/en/language/oop5/interfaces.xml:1.11 Mon Aug 11 22:16:23 2008
+++ phpdoc/en/language/oop5/interfaces.xml Mon Aug 11 22:23:57 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<sect1 xml:id="language.oop5.interfaces" xmlns="http://docbook.org/ns/docbook">
<title>Object Interfaces</title>
<para>
@@ -44,6 +44,7 @@
<programlisting role="php">
<![CDATA[
<?php
+
// Declare the interface 'iTemplate'
interface iTemplate
{
@@ -84,7 +85,6 @@
$this->vars[$name] = $var;
}
}
-
?>
]]>
</programlisting>
@@ -93,6 +93,7 @@
<title>Extendable Interfaces</title>
<programlisting role="php">
<![CDATA[
+<?php
interface a
{
public function foo();
@@ -126,6 +127,45 @@
{
}
}
+?>
+]]>
+ </programlisting>
+ </example>
+ <example xml:id="language.oop5.interfaces.examples.ex3">
+ <title>Multiple interface inheritance</title>
+ <programlisting role="php">
+<![CDATA[
+interface a
+{
+ public function foo();
+}
+
+interface b
+{
+ public function bar();
+}
+
+interface c extends a, b
+{
+ public function baz();
+}
+
+class d implements c
+{
+ public function foo()
+ {
+ }
+
+
+ public function bar()
+ {
+ }
+
+
+ public function baz()
+ {
+ }
+}
]]>
</programlisting>
</example>