Go\Aop\Support\AnnotatedReflectionMethod::getClosure PHP Méthode

getClosure() public méthode

public getClosure ( $object )
    public function getClosure($object)
    {
        if (!defined('HHVM_VERSION')) {
            return parent::getClosure($object);
        }
        $className = $this->getDeclaringClass()->name;
        $methodName = $this->name;
        $closure = function (...$args) use($methodName, $className) {
            $result = forward_static_call_array(array($className, $methodName), $args);
            return $result;
        };
        return $closure->bindTo($object, $this->class);
    }