[ Index ]

PHP Cross Reference of Automap

title

Body

[close]

/Automap/ -> Mgr.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: 479 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mgr:: (26 methods):
  init()
  registerFailureHandler()
  callFailureHandlers()
  registerSuccessHandler()
  callSuccessHandlers()
  key()
  typeToString()
  stringToType()
  isActiveID()
  validate()
  map()
  activeIDs()
  load()
  unload()
  usingAccelerator()
  symbolIsDefined()
  autoloadHook()
  resolve()
  getFunction()
  getConstant()
  getClass()
  getExtension()
  requireFunction()
  requireConstant()
  requireClass()
  requireExtension()


Class: Mgr  - X-Ref

init()   X-Ref
Undocumented - Internal use only


registerFailureHandler($callable)   X-Ref
Register a failure handler

Once registered, the failure handler is called each time a symbol resolution
fails.

There is no limit on the number of failure handlers that can be registered.

Handlers cannot be unregistered.

param: callable $callable
return: null

callFailureHandlers($type,$name)   X-Ref
Call every registered failure handlers

Call provides two arguments : the symbol type (one of the 'T_' constants)
and the symbol name.

Handlers are called in registration order.

param: string $type one of the 'T_' constants
param: string $name The symbol name
return: null

registerSuccessHandler($callable)   X-Ref
Register a success handler

Once registered, the success handler is called each time a symbol resolution
succeeds.

The success handler receives two arguments : An array as returned by the
getSymbol() method, and the ID of the map where the symbol was found.

There is no limit on the number of success handlers that can be registered.

Handlers cannot be unregistered.

param: callable $callable
return: null

callSuccessHandlers($entry,$id)   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: access reserved for Automap classes

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

typeToString($type)   X-Ref
No description

stringToType($string)   X-Ref
No description

isActiveID($id)   X-Ref
Checks if a map ID is active (if it corresponds to a loaded map)

param: integer $id ID to check
return: boolean

validate($id)   X-Ref
Same as isActiveID() but throws an exception if the map ID is invalid

Returns the map ID so that it can be embedded in a call string.

param: integer $id ID to check
return: integer ID (not modified)

map($id)   X-Ref
Returns the \Automap\Map object corresponding to an active map ID

param: string $id The map ID
return: \Automap\Map instance

activeIDs()   X-Ref
Returns the list of currently active IDs.

return: array

load($path,$flags=0,$_bp=null)   X-Ref
Loads a map file and returns its ID.

param: string $path The path of the map file to load
param: integer $flags Load flags
param: string $_bp Reserved for internal operations. Never set this param.
return: int the map ID

unload($id)   X-Ref
Unloads a map

We dont use __destruct because :
1. We don't want this to be called on script shutdown
2. Exceptions cannot be caught when sent from a destructor.

If the input ID is invalid, it is silently ignored.

param: string $id The map ID to unload
return: null

usingAccelerator()   X-Ref
No description

symbolIsDefined($type,$name)   X-Ref
No description

autoloadHook($name,$type=self::T_CLASS)   X-Ref
No description

resolve($type,$name,$autoloading=false,$exception=false)   X-Ref
Resolve a symbol

, i.e. load what needs to be loaded for the symbol to be
defined.

In order to optimize the PHK case, maps are searched in reverse order
(newest first).

Warning: Autoload mechanism is not reentrant. This function cannot reference
an unknow class (like \Phool\Display).

param: string $type Symbol type
param: string $name Symbol name
param: bool $autoloading Whether this was called by the PHP autoloader
param: bool $exception Whether we must throw an exception if the resolution fails
return: true on success / false if unable to resolve symbol

getFunction($name)   X-Ref
No description

getConstant($name)   X-Ref
No description

getClass($name)   X-Ref
No description

getExtension($name)   X-Ref
No description

requireFunction($name)   X-Ref
No description

requireConstant($name)   X-Ref
No description

requireClass($name)   X-Ref
No description

requireExtension($name)   X-Ref
No description



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