VERSION
VERSION
Runtime API version
key(string $type, string $name) : string
Combines a type and a symbol in a 'key'
Starting with version 3.0, Automap is fully case-sensitive. This allows for higher performance and cleaner code.
Do not use this method (reserved for use by other Automap classes)
string | $type | one of the 'T_' constants |
string | $name | The symbol value (case sensitive) |
Symbol key
nsKey(string $name) : string
Extracts the namespace from a symbol name
The returned value has no leading/trailing separator.
Do not use: access reserved for Automap classes
string | $name | The symbol value (case sensitive) |
Namespace. If no namespace, returns an empty string.
resolve(string $type, $name, integer $id) : \Automap\exported
Try to resolve a symbol using this map
For performance reasons, we trust the map and don't check if the symbol is defined after loading the script/extension/package.
string | $type | One of the \Automap\Mgr::T_xxx symbol types |
$name | ||
integer | $id | Used to return the ID of the map where the symbol was found |
entry if found, false if not found
_peclGetMap(string $version) : array
Transmits map elements to the PECL extension
Reserved for internal use
The first time a given map file is loaded, it is read by Automap\Map and transmitted to the extension. On subsequent requests, it is retrieved from persistent memory. This allows to code complex features in PHP and maintain the code in a single location without impacting performance.
string | $version | The version of data to transmit (reserved for future use) |
combinePath(string $base, string|null $path, boolean $separ = false) : string
Combines a base path with another path
The base path can be relative or absolute.
The 2nd path can also be relative or absolute. If absolute, it is returned as-is. If it is a relative path, it is combined to the base path.
Uses '/' as separator (to be compatible with stream-wrapper URIs).
string | $base | The base path |
string|null | $path | The path to combine |
boolean | $separ | true: add trailing sep, false: remove it |
The resulting path
mkAbsolutePath(string $path, boolean $separ = false) : string
Build an absolute path from a given (absolute or relative) path
If the input path is relative, it is combined with the current working directory.
string | $path | The path to make absolute |
boolean | $separ | True if the resulting path must contain a trailing separator |
The resulting absolute path