[ Index ]

PHP Cross Reference of Automap

title

Body

[close]

/Automap/ -> Map.php (summary)

(no description)

Copyright: Francois Laupretre <automap@tekwire.net>
License: http://www.apache.org/licenses/LICENSE-2.0 Apache License, V 2.0
File Size: 522 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Map:: (25 methods):
  __construct()
  isMapFile()
  key()
  loadSlot()
  nsKey()
  path()
  flags()
  options()
  version()
  minVersion()
  basePath()
  option()
  symbolCount()
  exportEntry()
  getSymbol()
  resolve()
  symbols()
  show()
  check()
  export()
  _peclGetMap()
  combinePath()
  trailingSepar()
  isAbsolutePath()
  mkAbsolutePath()


Class: Map  - X-Ref

__construct($path,$flags=0,$_bp=null)   X-Ref
Construct a map object from an existing map file (real or virtual)

param: string $path Path of the map file to read
param: integer $flags Combination of Automap load flags (@see Automap)
param: string Reserved for internal use (PHK). Never set this.

isMapFile($path)   X-Ref
No description

key($type,$name)   X-Ref
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)

param: string $type one of the 'T_' constants
param: string $name The symbol value (case sensitive)
return: string Symbol key

loadSlot($ns)   X-Ref
Load a slot into the symbol table

param: string $ns Normalized namespace. Must correspond to an existing slot (no check)
return: null

nsKey($name)   X-Ref
Extracts the namespace from a symbol name

The returned value has no leading/trailing separator.

Do not use: access reserved for Automap classes

param: string $name The symbol value (case sensitive)
return: string Namespace. If no namespace, returns an empty string.

path()   X-Ref
No description

flags()   X-Ref
No description

options()   X-Ref
No description

version()   X-Ref
No description

minVersion()   X-Ref
No description

basePath()   X-Ref
No description

option($opt)   X-Ref
No description

symbolCount()   X-Ref
No description

exportEntry($key)   X-Ref
No description

getSymbol($type,$symbol)   X-Ref
No description

resolve($type,$name,&$id)   X-Ref
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.

param: string $type One of the \Automap\Mgr::T_xxx symbol types
param: string Symbol name including namespace (no leading '\')
param: integer $id Used to return the ID of the map where the symbol was found
return: exported entry if found, false if not found

symbols()   X-Ref
No description

show($format=null,$subfile_to_url_function=null)   X-Ref
No description

check()   X-Ref
No description

export($path=null)   X-Ref
No description

_peclGetMap($version)   X-Ref
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.

param: string $version The version of data to transmit (reserved for future use)
return: array

combinePath($base,$path,$separ=false)   X-Ref
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).

param: string $base The base path
param: string|null $path The path to combine
param: bool $separ true: add trailing sep, false: remove it
return: string The resulting path

trailingSepar($path, $separ)   X-Ref
Adds or removes a trailing separator in a path

param: string $path Input
param: bool $flag true: add trailing sep, false: remove it
return: bool The result path

isAbsolutePath($path)   X-Ref
Determines if a given path is absolute or relative

param: string $path The path to check
return: bool True if the path is absolute, false if relative

mkAbsolutePath($path,$separ=false)   X-Ref
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.

param: string $path The path to make absolute
param: bool $separ True if the resulting path must contain a trailing separator
return: string The resulting absolute path



Generated: Thu Jun 4 18:32:29 2015 Cross-referenced by PHPXref 0.7.1