PHP Class Varien_Autoload

Exibir arquivo Open project: aoepeople/aoe_classpathcache Class Usage Examples

Public Properties

Property Type Description
$useAPC

Protected Properties

Property Type Description
$_BP * Base Path
$_cache
$_instance
$_numberOfFilesAddedToCache
$_scope
$cacheKey

Public Methods

Method Description
__construct ( ) Class constructor
__destruct ( ) Class destructor
autoload ( string $class ) : boolean Load class source code
getCache ( ) : array Get cache
getCacheFilePath ( ) : string Get cache file path
getCacheKey ( ) : string Get cache key (for apc)
getFileFromClassName ( string $className ) : string Get file name from class name
getFullPath ( $className ) : mixed Get full path
getRevalidateFlagPath ( ) : string Get revalidate flag file path
getScope ( ) : string Get current autoload scope
instance ( ) : Varien_Autoload Singleton pattern implementation
isApcUsed ( ) : boolean Check if apc is used
loadCacheContent ( ) : array Load cache content from file
register ( ) Register SPL autoload function
registerScope ( string $code ) Register autoload scope This process allow include scope file which can contain classes definition which are used for this scope
searchFullPath ( $filename ) : boolean | string Checks if a file exists in the include path and returns the full path if the file exists
setCache ( array $cache ) Setting cache content

Method Details

__construct() public method

Class constructor
public __construct ( )

__destruct() public method

Class destructor
public __destruct ( )

autoload() public method

Load class source code
public autoload ( string $class ) : boolean
$class string
return boolean

getCache() public static method

Get cache
public static getCache ( ) : array
return array

getCacheFilePath() public static method

Get cache file path
public static getCacheFilePath ( ) : string
return string

getCacheKey() public static method

Get cache key (for apc)
public static getCacheKey ( ) : string
return string

getFileFromClassName() public static method

Get file name from class name
public static getFileFromClassName ( string $className ) : string
$className string
return string

getFullPath() public static method

Get full path
public static getFullPath ( $className ) : mixed
$className
return mixed

getRevalidateFlagPath() public static method

Get revalidate flag file path
public static getRevalidateFlagPath ( ) : string
return string

getScope() public static method

Get current autoload scope
public static getScope ( ) : string
return string

instance() public static method

Singleton pattern implementation
public static instance ( ) : Varien_Autoload
return Varien_Autoload

isApcUsed() public static method

Check if apc is used
public static isApcUsed ( ) : boolean
return boolean

loadCacheContent() public static method

Load cache content from file
public static loadCacheContent ( ) : array
return array

register() public static method

Register SPL autoload function
public static register ( )

registerScope() public static method

Register autoload scope This process allow include scope file which can contain classes definition which are used for this scope
public static registerScope ( string $code )
$code string scope code

searchFullPath() public static method

Checks if a file exists in the include path and returns the full path if the file exists
public static searchFullPath ( $filename ) : boolean | string
$filename
return boolean | string

setCache() public static method

Setting cache content
public static setCache ( array $cache )
$cache array

Property Details

$_BP protected_oe static_oe property

* Base Path
protected static $_BP

$_cache protected_oe static_oe property

protected static $_cache

$_instance protected_oe static_oe property

protected static $_instance

$_numberOfFilesAddedToCache protected_oe static_oe property

protected static $_numberOfFilesAddedToCache

$_scope protected_oe static_oe property

protected static $_scope

$cacheKey protected_oe static_oe property

protected static $cacheKey

$useAPC public_oe static_oe property

public static $useAPC