PHP Class Swagger\StaticAnalyser

Afficher le fichier Open project: zircote/swagger-php Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
fromTokens ( array $tokens, Context $parseContext ) : Analysis Shared implementation for parseFile() & parseContents().

Private Methods

Méthode Description
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 )

Method Details

__construct() public méthode

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

fromCode() public méthode

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.
Résultat Analysis

fromFile() public méthode

Extract and process all doc-comments from a file.
public fromFile ( string $filename ) : Analysis
$filename string Path to a php file.
Résultat Analysis

fromTokens() protected méthode

Shared implementation for parseFile() & parseContents().
protected fromTokens ( array $tokens, Context $parseContext ) : Analysis
$tokens array The result of a token_get_all()
$parseContext Context
Résultat Analysis