From da72824c454f84d125b6747b65828c45bfafd972 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Fri, 19 Aug 2011 15:01:58 +0000 Subject: [PATCH] examples ws git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315199 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/traits.xml | 176 +++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 31828868f3..48b04d4c28 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -65,20 +65,20 @@ class ezcReflectionFunction extends ReflectionFunction { ]]> @@ -253,20 +253,20 @@ class Aliased_Talker { ]]> @@ -287,23 +287,23 @@ class MyClass2 { getWorld(); - } - abstract public function getWorld(); + public function sayHelloWorld() { + echo 'Hello'.$this->getWorld(); + } + abstract public function getWorld(); } class MyHelloWorld { - private $world; - use Hello; - public function getWorld() { - return $this->world; - } - public function setWorld($val) { - $this->world = $val; - } + private $world; + use Hello; + public function getWorld() { + return $this->world; + } + public function setWorld($val) { + $this->world = $val; + } } ?> ]]> @@ -367,24 +367,24 @@ class MyHelloWorld { inc(); // echo 1 - $p = new C2(); $p->inc(); // echo 1 +$o = new C1(); $o->inc(); // echo 1 +$p = new C2(); $p->inc(); // echo 1 ?> ]]> @@ -394,17 +394,17 @@ class MyHelloWorld { ]]>