src/RecordedGame.php
public function getAnalysis($analyzerName, $arg = null, $startAt = 0)
    {
        $key = $analyzerName . ':' . $startAt;
        if (!array_key_exists($key, $this->analyses)) {
            $analyzer = new $analyzerName($arg);
            $analyzer->position = $startAt;
            $result = new \StdClass;
            $result->analysis = $this->runAnalyzer($analyzer);
            $result->position = $analyzer->position;
            $this->analyses[$key] = $result;
        }
        return $this->analyses[$key];
    }
public function getAnalysis($analyzerName, $arg = null, $startAt = 0)
    {
        $key = $analyzerName . ':' . $startAt;
        if (!array_key_exists($key, $this->analyses)) {
            $analyzer = new $analyzerName($arg);
            $analyzer->position = $startAt;
            $result = new \StdClass;
            $result->analysis = $this->runAnalyzer($analyzer);
            $result->position = $analyzer->position;
            $this->analyses[$key] = $result;
        }
        return $this->analyses[$key];
    }
public function getAnalysis ( $ analyzerName , $ arg = null , $ startAt = 0 ) { $ key = $ analyzerName . ':' . $ startAt ; if ( ! array_key_exists ( $ key , $ this -> analyses ) ) { $ analyzer = new $ analyzerName ( $ arg ) ; $ analyzer -> position = $ startAt ; $ result = new \ StdClass ; $ result -> analysis = $ this -> runAnalyzer ( $ analyzer ) ; $ result -> position = $ analyzer -> position ; $ this -> analyses [ $ key ] = $ result ; } return $ this -> analyses [ $ key ] ; }
Get an analysis result for a specific analyzer, running it if necessary.

@param string  $analyzerName  Fully qualified name of the analyzer class.
@param mixed  $arg  Optional argument to the analyzer.
@param int  $startAt  Position to start at.
@return mixed
Get an analysis result for a specific analyzer running it if necessary .