Methods

Bootstrap individual, all, or multiple resources

bootstrap(null | string | array $resource) : \Zend_Application_Bootstrap_BootstrapAbstract

Marked as final to prevent issues when subclassing and naming the child class 'Bootstrap' (in which case, overriding this method would result in it being treated as a constructor).

If you need to override this functionality, override the _bootstrap() method.

Parameters

$resource

nullstringarray

Exceptions

\Knowledgeroot_Module_Bootstrap_Exception When invalid argument was passed

Returns

\Zend_Application_Bootstrap_BootstrapAbstract

Get class resource names

getClassResourceNames() : array

Returns

array

Get class resources (as resource/method pairs)

getClassResources() : array

Uses get_class_methods() by default, reflection on prior to 5.2.6, as a bug prevents the usage of get_class_methods() there.

Returns

array

run()

run() 

Bootstrap implementation

_bootstrap(null | string | array $resource) : void

This method may be overridden to provide custom bootstrapping logic. It is the sole method called by bootstrap().

Parameters

$resource

nullstringarray

Exceptions

\Knowledgeroot_Module_Bootstrap_Exception When invalid argument was passed

Execute a resource

_executeResource(string $resource) : void

Checks to see if the resource has already been run. If not, it searches first to see if a local method matches the resource, and executes that. If not, it checks to see if a plugin resource matches, and executes that if found.

Finally, if not found, it throws an exception.

Parameters

$resource

string

Exceptions

\Knowledgeroot_Module_Bootstrap_Exception When resource not found

Mark a resource as having run

_markRun(string $resource) : void

Parameters

$resource

string

 Properties

 

Internal resource methods (resource/method pairs)

$_classResources : array
 

Initializers that have been run

$_run : array
 

Initializers that have been started but not yet completed (circular dependency detection)

$_started : array