Horde_Autoloader_Cache extends Horde_Autoloader_Default
Decorator for Horde_Autoloader that implements caching of class-file-maps.
Tags
Table of Contents
- APC = 1
- EACCELERATOR = 3
- KEYLIST = 'horde_autoloader_keys'
- PREFIX = 'horde_autoloader_cache'
- TEMPFILE = 4
- XCACHE = 2
- $_cache : array<string|int, mixed>
- Map of all classes already looked up.
- $_cachekey : string
- Cache key name.
- $_changed : bool
- Has the cache changed since the last save?
- $_newkey : bool
- Is this a new key?
- $_storage : mixed
- __construct() : mixed
- Constructor.
- loadClass() : mixed
- mapToPath() : string
- Search registered mappers in LIFO order.
- prune() : bool
- Prunes the autoloader cache.
- shutdown() : mixed
- Shutdown method.
- _getKeylist() : array<string|int, mixed>
- Returns the keylist.
- _saveKeylist() : mixed
- Saves the keylist.
Constants
APC
public
mixed
APC
= 1
EACCELERATOR
public
mixed
EACCELERATOR
= 3
KEYLIST
public
mixed
KEYLIST
= 'horde_autoloader_keys'
PREFIX
public
mixed
PREFIX
= 'horde_autoloader_cache'
TEMPFILE
public
mixed
TEMPFILE
= 4
XCACHE
public
mixed
XCACHE
= 2
Properties
$_cache
Map of all classes already looked up.
protected
array<string|int, mixed>
$_cache
= array()
$_cachekey
Cache key name.
protected
string
$_cachekey
$_changed
Has the cache changed since the last save?
protected
bool
$_changed
= alse
$_newkey
Is this a new key?
protected
bool
$_newkey
= alse
$_storage
protected
mixed
$_storage
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —loadClass()
public
loadClass(mixed $className) : mixed
Parameters
- $className : mixed
Return values
mixed —mapToPath()
Search registered mappers in LIFO order.
public
mapToPath(string $className) : string
Parameters
- $className : string
-
Classname.
Return values
string —Path.
prune()
Prunes the autoloader cache.
public
prune() : bool
Return values
bool —True if pruning succeeded.
shutdown()
Shutdown method.
public
shutdown() : mixed
Attempts to save the class map to the cache.
Return values
mixed —_getKeylist()
Returns the keylist.
protected
_getKeylist() : array<string|int, mixed>
Return values
array<string|int, mixed> —Keylist.
_saveKeylist()
Saves the keylist.
protected
_saveKeylist(array<string|int, mixed> $keylist) : mixed
Parameters
- $keylist : array<string|int, mixed>
-
Keylist to save.