Constants

VERSION

VERSION

MIN_RUNTIME_VERSION

MIN_RUNTIME_VERSION

Properties

$symbols

$symbols : 

Type

$options

$options : 

Type

$php_file_ext

$php_file_ext : 

Type

$parser

$parser : 

Type

Methods

__construct()

__construct(  $parser = null) 

Parameters

$parser

setParser()

setParser(  $parser = null) 

Parameters

$parser

option()

option(  $opt) 

Parameters

$opt

setOption()

setOption(  $option,   $value) 

Parameters

$option
$value

unsetOption()

unsetOption(  $option) 

Parameters

$option

setPhpFileExt()

setPhpFileExt(  $a) : null

Set the list of file suffixes recognized as PHP source scripts

Default list is 'php, 'inc, 'hh'.

Parameters

$a

Returns

null

symbolCount()

symbolCount() 

addSymbol()

addSymbol(  $stype,   $sname,   $ftype,   $fpath) 

Parameters

$stype
$sname
$ftype
$fpath

serialize()

serialize() 

save()

save(  $path) 

Parameters

$path

registerExtensionFile()

registerExtensionFile(  $file) 

Parameters

$file

registerExtensionDir()

registerExtensionDir() 

registerScriptFile()

registerScriptFile(  $fpath,   $rpath,   $ns_filter = null) 

Parameters

$fpath
$rpath
$ns_filter

registerPath()

registerPath(string  $fpath, string  $rpath, string|array|null  $ns_filter = null, string|null  $file_pattern = null) 

Recursively scan a path and records symbols

Scan retains PHP source files and phk packages only (based on file suffix)

Only dirs and regular files are considered. Other types are ignored.

Parameters

string $fpath

Path to register

string $rpath

Path to register to in map for $fpath

string|array|null $ns_filter

List of authorized namespaces (empty string means no namespace)

    If null, no filtering.
string|null $file_pattern

File path preg pattern (File paths not matching this pattern are ignored)

readMapFile()

readMapFile(  $fpath) 

Parameters

$fpath

mergeMapFile()

mergeMapFile(string  $fpath,   $rpath) : null

Merge an existing map file into the current map

Import symbols only. Options are ignored (including base path).

Parameters

string $fpath

Path of the map to merge (input)

$rpath

Returns

null

mergeMapSymbols()

mergeMapSymbols(  $map,   $rpath = '.') 

Parameters

$map
$rpath

registerPhkPkg()

registerPhkPkg(  $fpath,   $rpath) 

Parameters

$fpath
$rpath

import()

import(  $path = null) 

Parameters

$path

addEntry()

addEntry(  $va) 

Parameters

$va

addTSEntry()

addTSEntry(  $stype,   $sname,   $va) 

Parameters

$stype
$sname
$va

mkVarray()

mkVarray(  $ftype,   $fpath,   $ns_filter = null) 

Parameters

$ftype
$fpath
$ns_filter

unregisterTarget()

unregisterTarget(  $va) 

Parameters

$va

normalizePath()

normalizePath(  $path) : string

Normalize a destination path

  1. Replace backslashes with forward slashes.
  2. Remove trailing slashes

Parameters

$path

Returns

string —

the normalized path