コード例 #1
0
ファイル: Command.php プロジェクト: rbello/ent
 public function __construct($name, $instance, $method)
 {
     $class = new \Wingu\OctopusCore\Reflection\ReflectionClass($instance);
     $this->method = $class->getMethod($method);
     $doc = $this->method->getReflectionDocComment();
     parent::__construct($name, $doc);
     $this->instance = $instance;
     $this->methodName = $method;
 }
コード例 #2
0
ファイル: Traits.Utils.php プロジェクト: rbello/ent
 /**
  * @deprecated
  */
 public static function reflections($instance, $method = null)
 {
     $class = new \Wingu\OctopusCore\Reflection\ReflectionClass($instance);
     if ($method != null) {
         $method = $class->getMethod($method);
         $doc = $method->getReflectionDocComment();
         $annotations = $doc->getAnnotationsCollection();
         return array($method, $annotations, $class, $doc);
     }
     $doc = $class->getReflectionDocComment();
     $annotations = $doc->getAnnotationsCollection();
     return array($class, $annotations, $doc);
 }