Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- */
- public function fromClass(ClassType $reflection)
- {
- $methods = $reflection->getMethods();
- $array = [];
- foreach($methods as $one)
- {
- /**
- * Dva druhy zápisu. Jeden kratší, druhý dlouhý oba dělají to samé.
- */
- Strings::startsWith($one->getName(),"get")
- ? $one->getDeclaringClass() == $reflection->getName() ? $array[] = $one : null
- : null;
- if(Strings::startsWith($one->getName(),"get"))
- {
- if($one->getDeclaringClass() == $reflection->getName())
- {
- $array[] = $one;
- }
- else
- {
- continue;
- }
- }
- else
- {
- continue;
- }
- }
- Dumper::dump($array);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement