Autoloader
in package
Implements a lightweight PSR-0 compliant autoloader for Predis.
Tags
Table of Contents
- $directory : mixed
- $prefix : mixed
- $prefixLength : mixed
- __construct() : mixed
- autoload() : mixed
- Loads a class from a file using its fully qualified name.
- register() : mixed
- Registers the autoloader class with the PHP SPL autoloader.
Properties
$directory
private
mixed
$directory
$prefix
private
mixed
$prefix
$prefixLength
private
mixed
$prefixLength
Methods
__construct()
public
__construct([string $baseDirectory = __DIR__ ]) : mixed
Parameters
- $baseDirectory : string = __DIR__
-
Base directory where the source files are located.
Return values
mixed —autoload()
Loads a class from a file using its fully qualified name.
public
autoload(string $className) : mixed
Parameters
- $className : string
-
Fully qualified name of a class.
Return values
mixed —register()
Registers the autoloader class with the PHP SPL autoloader.
public
static register([bool $prepend = false ]) : mixed
Parameters
- $prepend : bool = false
-
Prepend the autoloader on the stack instead of appending it.