gen_stub.php
Interfaces, Classes, Traits and Enums
- FunctionOrMethodName
- Context
- SimpleType
- Type
- ArginfoType
- ArgInfo
- FunctionName
- MethodName
- ReturnInfo
- FuncInfo
- ClassInfo
- FileInfo
- DocCommentTag
Table of Contents
-
processDirectory()
: array<string|int, FileInfo>
-
processStubFile()
: FileInfo|null
-
computeStubHash()
: string
-
extractStubHash()
: string|null
-
parseDocComment()
: array<string|int, DocCommentTag>
-
parseFunctionLike()
: FuncInfo
-
handlePreprocessorConditions()
: string|null
-
getFileDocComment()
: Doc|null
-
handleStatements()
: mixed
-
parseStubFile()
: FileInfo
-
funcInfoToCode()
: string
-
findEquivalentFuncInfo()
: FuncInfo|null
-
generateCodeWithConditions()
: string
-
generateArgInfoCode()
: string
-
generateFunctionEntries()
: string
-
generateMethodSynopses()
: array<string, string>
-
replaceMethodSynopses()
: array<string, string>
-
installPhpParser()
: mixed
-
initPhpParser()
: mixed
processDirectory()
processDirectory(string $dir, Context $context) : array<string|int, FileInfo>
Parameters
-
$dir
: string
-
-
$context
: Context
-
Return values
array<string|int, FileInfo>
—
processStubFile()
processStubFile(string $stubFile, Context $context) : FileInfo|null
Parameters
-
$stubFile
: string
-
-
$context
: Context
-
Return values
FileInfo|null
—
computeStubHash()
computeStubHash(string $stubCode) : string
Parameters
-
$stubCode
: string
-
Return values
string
—
extractStubHash(string $arginfoFile) : string|null
Parameters
-
$arginfoFile
: string
-
Return values
string|null
—
parseDocComment(Doc $comment) : array<string|int, DocCommentTag>
Parameters
-
$comment
: Doc
-
Return values
array<string|int, DocCommentTag>
—
parseFunctionLike()
parseFunctionLike(PrettyPrinterAbstract $prettyPrinter, FunctionOrMethodName $name, int $classFlags, int $flags, FunctionLike $func, string|null $cond) : FuncInfo
Parameters
-
$prettyPrinter
: PrettyPrinterAbstract
-
-
$name
: FunctionOrMethodName
-
-
$classFlags
: int
-
-
$flags
: int
-
-
$func
: FunctionLike
-
-
$cond
: string|null
-
Return values
FuncInfo
—
handlePreprocessorConditions()
handlePreprocessorConditions(array<string|int, mixed> &$conds, Stmt $stmt) : string|null
Parameters
-
$conds
: array<string|int, mixed>
-
-
$stmt
: Stmt
-
Return values
string|null
—
getFileDocComment(array<string|int, mixed> $stmts) : Doc|null
Parameters
-
$stmts
: array<string|int, mixed>
-
Return values
Doc|null
—
handleStatements()
handleStatements(FileInfo $fileInfo, array<string|int, mixed> $stmts, PrettyPrinterAbstract $prettyPrinter) : mixed
Parameters
-
$fileInfo
: FileInfo
-
-
$stmts
: array<string|int, mixed>
-
-
$prettyPrinter
: PrettyPrinterAbstract
-
Return values
mixed
—
parseStubFile()
parseStubFile(string $code) : FileInfo
Parameters
-
$code
: string
-
Return values
FileInfo
—
funcInfoToCode()
funcInfoToCode(FuncInfo $funcInfo) : string
Parameters
-
$funcInfo
: FuncInfo
-
Return values
string
—
findEquivalentFuncInfo()
findEquivalentFuncInfo(array<string|int, FuncInfo> $generatedFuncInfos, FuncInfo $funcInfo) : FuncInfo|null
Parameters
-
$generatedFuncInfos
: array<string|int, FuncInfo>
-
-
$funcInfo
: FuncInfo
-
Return values
FuncInfo|null
—
generateCodeWithConditions()
generateCodeWithConditions(iteratable<string|int, FuncInfo> $funcInfos, string $separator, Closure $codeGenerator) : string
Parameters
-
$funcInfos
: iteratable<string|int, FuncInfo>
-
-
$separator
: string
-
-
$codeGenerator
: Closure
-
Return values
string
—
generateArgInfoCode()
generateArgInfoCode(FileInfo $fileInfo, string $stubHash) : string
Parameters
-
$fileInfo
: FileInfo
-
-
$stubHash
: string
-
Return values
string
—
generateFunctionEntries()
generateFunctionEntries(Name|null $className, array<string|int, FuncInfo> $funcInfos) : string
Parameters
-
$className
: Name|null
-
-
$funcInfos
: array<string|int, FuncInfo>
-
Return values
string
—
generateMethodSynopses()
generateMethodSynopses(array<string|int, FuncInfo> $funcMap, array<string|int, FuncInfo> $aliasMap) : array<string, string>
Parameters
-
$funcMap
: array<string|int, FuncInfo>
-
-
$aliasMap
: array<string|int, FuncInfo>
-
Return values
array<string, string>
—
replaceMethodSynopses()
replaceMethodSynopses(string $targetDirectory, array<string|int, FuncInfo> $funcMap, array<string|int, FuncInfo> $aliasMap) : array<string, string>
Parameters
-
$targetDirectory
: string
-
-
$funcMap
: array<string|int, FuncInfo>
-
-
$aliasMap
: array<string|int, FuncInfo>
-
Return values
array<string, string>
—
installPhpParser()
installPhpParser(string $version, string $phpParserDir) : mixed
Parameters
-
$version
: string
-
-
$phpParserDir
: string
-
Return values
mixed
—
initPhpParser()
initPhpParser() : mixed
Return values
mixed
—