GrumPHP\Parser\Php\Context\ParserContext::getFile PHP Метод

getFile() публичный Метод

public getFile ( ) : SplFileInfo
Результат SplFileInfo
    public function getFile()
    {
        return $this->file;
    }

Usage Example

Пример #1
0
 /**
  * @param string $message
  * @param int    $line
  * @param string $type
  */
 protected function addError($message, $line = -1, $type = ParseError::TYPE_ERROR)
 {
     $errors = $this->context->getErrors();
     $fileName = $this->context->getFile()->getRealPath();
     $errors->add(new PhpParserError($type, $message, $fileName, $line));
 }