note 112091 added to function.class-uses
| From: | adam at adamhahn dot com | Date: | Thu, 02 May 2013 00:29:17 +0000 |
| Subject: | note 112091 added to function.class-uses | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194683@lists.php.net to get a copy of this message | ||
This function can be used on traits as well as classes. Since traits 'use' other traits to
create inheritance, this function allows you to get the parent trait(s) of another trait.
<?php
trait foo {
}
trait child {
use foo;
}
print_r(class_uses('child')); // Outputs array containing 'foo'
?>
----
Server IP: 192.41.42.26
Probable Submitter: 23.31.250.181
----
Manual Page -- http://php.net/manual/en/function.class-uses.php
Edit -- https://master.php.net/note/edit/112091
Del: integrated -- https://master.php.net/note/delete/112091/integrated
Del: useless -- https://master.php.net/note/delete/112091/useless
Del: bad code -- https://master.php.net/note/delete/112091/bad+code
Del: spam -- https://master.php.net/note/delete/112091/spam
Del: non-english -- https://master.php.net/note/delete/112091/non-english
Del: in docs -- https://master.php.net/note/delete/112091/in+docs
Del: other reasons-- https://master.php.net/note/delete/112091
Reject -- https://master.php.net/note/reject/112091
Search -- https://master.php.net/manage/user-notes.php