From 31e3e09380fd44e10fbf0bba347c1d5f4c9ffa73 Mon Sep 17 00:00:00 2001 From: Karoly Negyesi Date: Wed, 10 Aug 2016 09:42:52 +0000 Subject: [PATCH] clarify trait use as git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339838 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/traits.xml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 0c26345d43..bd0d70dea0 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -20,7 +20,7 @@ composition of behavior; that is, the application of class members without requiring inheritance. - + Trait example @@ -44,7 +44,7 @@ class ezcReflectionFunction extends ReflectionFunction { ]]> - + Precedence @@ -124,7 +124,7 @@ Hello Universe! - + Multiple Traits @@ -170,7 +170,7 @@ Hello World! - + Conflict Resolution @@ -184,8 +184,9 @@ Hello World! Since this only allows one to exclude methods, the as - operator can be used to allow the inclusion of one of the conflicting - methods under another name. + operator can be used to add an alias to one of the methods. Note the + as operator does not rename the method and it does not + affect any other method either. Conflict Resolution @@ -199,7 +200,7 @@ Hello World! The Aliased_Talker makes use of the as operator to be able to use B's bigTalk implementation under an additional alias talk. - + - + Changing Method Visibility @@ -273,7 +274,7 @@ class MyClass2 { - + Traits Composed from Traits @@ -320,7 +321,7 @@ Hello World! - + Abstract Trait Members @@ -354,7 +355,7 @@ class MyHelloWorld { - + Static Trait Members @@ -408,7 +409,7 @@ Example::doSomething(); - + Properties @@ -461,7 +462,7 @@ class PropertiesExample { - +