From 584248bf889c40bf2c442eab36fb2259efc862bf Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Mon, 17 Oct 2011 21:45:11 +0000 Subject: [PATCH] Added documentation of class_uses based on documentation of class_implements. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@318175 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/functions/class-uses.xml | 139 +++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 reference/spl/functions/class-uses.xml diff --git a/reference/spl/functions/class-uses.xml b/reference/spl/functions/class-uses.xml new file mode 100644 index 0000000000..8e2ac961e1 --- /dev/null +++ b/reference/spl/functions/class-uses.xml @@ -0,0 +1,139 @@ + + + + + class_uses + + Return the traits used by the given class + + + + &reftitle.description; + + arrayclass_uses + mixedclass + boolautoloadtrue + + + This function returns an array with the names of the traits that the + given class uses. This does however not include + any traits used by a parent class. + + + + + &reftitle.parameters; + + + + class + + + An object (class instance) or a string (class name). + + + + + autoload + + + Whether to allow this function to load the class automatically through + the __autoload magic + method. + + + + + + + + + + &reftitle.returnvalues; + + An array on success, or &false; on error. + + + + + &reftitle.examples; + + + <function>class_implements</function> example + + + + &example.outputs.similar; + + foo +) + +Array +( + [foo] => foo +) + +Array +( + [trait_of_not_loaded] => trait_of_not_loaded +) +]]> + + + + + + + &reftitle.seealso; + + + class_parents + get_declared_traits + + + + + +