PHP Класс Swagger\StaticAnalyser

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $filename = null )
fromCode ( string $code, Context $context ) : Analysis Extract and process all doc-comments from the contents.
fromFile ( string $filename ) : Analysis Extract and process all doc-comments from a file.

Защищенные методы

Метод Описание
fromTokens ( array $tokens, Context $parseContext ) : Analysis Shared implementation for parseFile() & parseContents().

Приватные методы

Метод Описание
analyseComment ( Analysis $analysis, Analyser $analyser, string $comment, Context $context )
nextToken ( array &$tokens, Context $context ) : string | array The next non-whitespace, non-comment token.
parseNamespace ( &$tokens, &$token, $parseContext )
parseUseStatement ( &$tokens, &$token, $parseContext )

Описание методов

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

public __construct ( string $filename = null )
$filename string

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

Extract and process all doc-comments from the contents.
public fromCode ( string $code, Context $context ) : Analysis
$code string PHP code. (including
$context Context The original location of the contents.
Результат Analysis

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

Extract and process all doc-comments from a file.
public fromFile ( string $filename ) : Analysis
$filename string Path to a php file.
Результат Analysis

fromTokens() защищенный Метод

Shared implementation for parseFile() & parseContents().
protected fromTokens ( array $tokens, Context $parseContext ) : Analysis
$tokens array The result of a token_get_all()
$parseContext Context
Результат Analysis