From 6ee44cfc781a421d15d38e772348757fa9444d32 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 23 Nov 2011 20:44:23 +0000 Subject: [PATCH] Trait properties git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@319725 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/traits.xml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/language/oop5/traits.xml b/language/oop5/traits.xml index 48b04d4c28..bffc8a8599 100644 --- a/language/oop5/traits.xml +++ b/language/oop5/traits.xml @@ -406,6 +406,57 @@ class Example { Example::doSomething(); ?> +]]> + + + + + + Properties + + Traits can also define properties. + + + Defining Properties + +x; +?> +]]> + + + + If a trait defines a property then a class can not define a property with + the same name, otherwise an error is issued. It is an + E_STRICT if the class definition is compatible (same + visibility and initial value) or fatal error otherwise. + + + Conflict Resolution + + ]]>