Documentation

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

Functions

computeStubHash()

computeStubHash(string $stubCode) : string
Parameters
$stubCode : string
Return values
string

extractStubHash()

extractStubHash(string $arginfoFile) : string|null
Parameters
$arginfoFile : string
Return values
string|null

handlePreprocessorConditions()

handlePreprocessorConditions(array<string|int, mixed> &$conds, Stmt $stmt) : string|null
Parameters
$conds : array<string|int, mixed>
$stmt : Stmt
Return values
string|null

getFileDocComment()

getFileDocComment(array<string|int, mixed> $stmts) : Doc|null
Parameters
$stmts : array<string|int, mixed>
Return values
Doc|null

funcInfoToCode()

funcInfoToCode(FuncInfo $funcInfo) : string
Parameters
$funcInfo : FuncInfo
Return values
string

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

Search results