Opis\Closure\ReflectionClosure::isStatic PHP 메소드

isStatic() 공개 메소드

public isStatic ( ) : boolean
리턴 boolean
    public function isStatic()
    {
        if ($this->isStaticClosure === null) {
            $this->isStaticClosure = strtolower(substr($this->getCode(), 0, 6)) === 'static';
        }
        return $this->isStaticClosure;
    }

Usage Example

예제 #1
0
파일: Analyzer.php 프로젝트: opis/closure
 /**
  * Analyzer a given closure.
  *
  * @param Closure $closure
  *
  * @return array
  */
 public function analyze(Closure $closure)
 {
     $reflection = new ReflectionClosure($closure);
     $scope = $reflection->getClosureScopeClass();
     $data = ['reflection' => $reflection, 'code' => $reflection->getCode(), 'hasThis' => $reflection->isBindingRequired(), 'context' => $reflection->getUseVariables(), 'hasRefs' => false, 'binding' => $reflection->getClosureThis(), 'scope' => $scope ? $scope->getName() : null, 'isStatic' => $reflection->isStatic()];
     return $data;
 }
All Usage Examples Of Opis\Closure\ReflectionClosure::isStatic