Exemple #1
0
 /**
  * Build callback for method signature
  *
  * @param  Reflection\AbstractFunction $reflection
  * @return Method\Callback
  */
 protected function _buildCallback(Reflection\AbstractFunction $reflection)
 {
     $callback = new Method\Callback();
     if ($reflection instanceof Reflection\ReflectionMethod) {
         $callback->setType($reflection->isStatic() ? 'static' : 'instance')->setClass($reflection->getDeclaringClass()->getName())->setMethod($reflection->getName());
     } elseif ($reflection instanceof Reflection\ReflectionFunction) {
         $callback->setType('function')->setFunction($reflection->getName());
     }
     return $callback;
 }