PHP Class CI_Driver_Library, TastyIgniter

This class enables you to create "Driver" libraries that add runtime ability to extend the capabilities of a class via additional driver objects
Author: EllisLab Dev Team
Show file Open project: tastyigniter/tastyigniter Class Usage Examples

Protected Properties

Property Type Description
$lib_name string Name of the current class - usually the driver class
$valid_drivers array Array of drivers that are available to use with the driver class

Public Methods

Method Description
__get ( $child ) : object Get magic method
load_driver ( $child ) : object Load driver

Method Details

__get() public method

The first time a child is used it won't exist, so we instantiate it subsequents calls will go straight to the proper child.
public __get ( $child ) : object
return object Child class

load_driver() public method

Separate load_driver call to support explicit driver load by library or user
public load_driver ( $child ) : object
return object Child class

Property Details

$lib_name protected property

Name of the current class - usually the driver class
protected string $lib_name
return string

$valid_drivers protected property

Array of drivers that are available to use with the driver class
protected array $valid_drivers
return array