From 043594b6148584a4071ce41074a9903bb1a1d1fe Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 23 Dec 2011 08:29:43 +0000 Subject: [PATCH] Trait functions git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@321345 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/get-declared-traits.xml | 57 ++++++++++++++ reference/classobj/functions/trait-exists.xml | 74 +++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 reference/classobj/functions/get-declared-traits.xml create mode 100644 reference/classobj/functions/trait-exists.xml diff --git a/reference/classobj/functions/get-declared-traits.xml b/reference/classobj/functions/get-declared-traits.xml new file mode 100644 index 0000000000..028b89f15d --- /dev/null +++ b/reference/classobj/functions/get-declared-traits.xml @@ -0,0 +1,57 @@ + + + + + + get_declared_traits + Returns an array of all declared traits + + + + &reftitle.description; + + arrayget_declared_traits + + + + + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns an array with names of all declared traits in values. + Returns &null; in case of a failure. + + + + + + + diff --git a/reference/classobj/functions/trait-exists.xml b/reference/classobj/functions/trait-exists.xml new file mode 100644 index 0000000000..b28850b782 --- /dev/null +++ b/reference/classobj/functions/trait-exists.xml @@ -0,0 +1,74 @@ + + + + + + trait_exists + Checks if the trait exists + + + + &reftitle.description; + + booltrait_exists + stringtraitname + boolautoload + + + + + + + + + &reftitle.parameters; + + + traitname + + + Name of the trait to check + + + + + autoload + + + Whether to autoload if not already loaded. + + + + + + + + &reftitle.returnvalues; + + Returns &true; if trait exists, &false; if not, &null; in case of an error. + + + + + + +