get() public method

public get ( mixed $cacheKey, callable $factory ) : mixed
$cacheKey mixed
$factory callable
return mixed
Example #1
0
 /**
  * @return mixed
  */
 public function getSyntaxTree()
 {
     return $this->lazyFactory->get(self::CONTEXT_AST, function () {
         $parser = new Parser(new Emulative());
         $stmts = $parser->parse($this->file->getSource());
         return $stmts;
     });
 }