Phan\AST\ContextNode::getClosure PHP 메소드

getClosure() 공개 메소드

public getClosure ( ) : Func
리턴 Phan\Language\Element\Func
    public function getClosure() : Func
    {
        $closure_fqsen = FullyQualifiedFunctionName::fromClosureInContext($this->context);
        if (!$this->code_base->hasFunctionWithFQSEN($closure_fqsen)) {
            throw new CodeBaseException($closure_fqsen, "Could not find closure {$closure_fqsen}");
        }
        return $this->code_base->getFunctionByFQSEN($closure_fqsen);
    }