Zend Framework
1.12
|
Public Member Functions | |
__construct ($application) | |
Constructor. | |
setOptions (array $options) | |
Set class state. | |
getOptions () | |
Get current options from bootstrap. | |
hasOption ($key) | |
Is an option present? | |
getOption ($key) | |
Retrieve a single option. | |
mergeOptions (array $array1, $array2=null) | |
Merge options recursively. | |
getClassResources () | |
Get class resources (as resource/method pairs) | |
getClassResourceNames () | |
Get class resource names. | |
registerPluginResource ($resource, $options=null) | |
Register a new resource plugin. | |
unregisterPluginResource ($resource) | |
Unregister a resource from the bootstrap. | |
hasPluginResource ($resource) | |
Is the requested plugin resource registered? | |
getPluginResource ($resource) | |
Get a registered plugin resource. | |
getPluginResources () | |
Retrieve all plugin resources. | |
getPluginResourceNames () | |
Retrieve plugin resource names. | |
setPluginLoader (Zend_Loader_PluginLoader_Interface $loader) | |
Set plugin loader for loading resources. | |
getPluginLoader () | |
Get the plugin loader for resources. | |
setApplication ($application) | |
Set application/parent bootstrap. | |
getApplication () | |
Retrieve parent application instance. | |
getEnvironment () | |
Retrieve application environment. | |
setContainer ($container) | |
Set resource container. | |
getContainer () | |
Retrieve resource container. | |
hasResource ($name) | |
Determine if a resource has been stored in the container. | |
getResource ($name) | |
Retrieve a resource from the container. | |
__get ($prop) | |
Implement PHP's magic to retrieve a ressource in the bootstrap. | |
__isset ($prop) | |
Implement PHP's magic to ask for the existence of a ressource in the bootstrap. | |
bootstrap ($resource=null) | |
Bootstrap individual, all, or multiple resources. | |
__call ($method, $args) | |
Overloading: intercept calls to bootstrap<resourcename>() methods. | |
![]() | |
run () | |
Run the application. | |
Protected Member Functions | |
_bootstrap ($resource=null) | |
Bootstrap implementation. | |
_executeResource ($resource) | |
Execute a resource. | |
_loadPluginResource ($resource, $options) | |
Load a plugin resource. | |
_markRun ($resource) | |
Mark a resource as having run. | |
_resolvePluginResourceName ($resource) | |
Resolve a plugin resource name. | |
Protected Attributes | |
$_application | |
$_classResources | |
$_container | |
$_environment | |
$_optionKeys = array() | |
$_options = array() | |
$_pluginLoader | |
$_pluginResources = array() | |
$_run = array() | |
$_started = array() | |
__construct | ( | $application | ) |
Constructor.
Sets application object, initializes options, and prepares list of initializer methods.
Zend_Application | Zend_Application_Bootstrap_Bootstrapper | $application |
Zend_Application_Bootstrap_Exception | When invalid application is provided |
Implements Zend_Application_Bootstrap_Bootstrapper.
__call | ( | $method, | |
$args | |||
) |
Overloading: intercept calls to bootstrap<resourcename>() methods.
string | $method | |
array | $args |
Zend_Application_Bootstrap_Exception | On invalid method name |
__get | ( | $prop | ) |
Implement PHP's magic to retrieve a ressource in the bootstrap.
string | $prop |
__isset | ( | $prop | ) |
Implement PHP's magic to ask for the existence of a ressource in the bootstrap.
string | $prop |
|
protected |
Bootstrap implementation.
This method may be overridden to provide custom bootstrapping logic. It is the sole method called by bootstrap().
null | string | array | $resource |
Zend_Application_Bootstrap_Exception | When invalid argument was passed |
|
protected |
Execute a resource.
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.
string | $resource |
Zend_Application_Bootstrap_Exception | When resource not found |
|
protected |
Load a plugin resource.
string | $resource | |
array | object | null | $options |
|
protected |
Mark a resource as having run.
string | $resource |
|
protected |
Resolve a plugin resource name.
Uses, in order of preference
The name is then cast to lowercase.
Zend_Application_Resource_Resource | $resource |
|
final |
Bootstrap individual, all, or multiple resources.
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.
null | string | array | $resource |
Zend_Application_Bootstrap_Exception | When invalid argument was passed |
Implements Zend_Application_Bootstrap_Bootstrapper.
getApplication | ( | ) |
Retrieve parent application instance.
Implements Zend_Application_Bootstrap_Bootstrapper.
getClassResourceNames | ( | ) |
getClassResources | ( | ) |
Get class resources (as resource/method pairs)
Uses get_class_methods() by default, reflection on prior to 5.2.6, as a bug prevents the usage of get_class_methods() there.
Implements Zend_Application_Bootstrap_Bootstrapper.
getContainer | ( | ) |
Retrieve resource container.
getEnvironment | ( | ) |
getOption | ( | $key | ) |
Retrieve a single option.
string | $key |
getOptions | ( | ) |
Get current options from bootstrap.
getPluginLoader | ( | ) |
Get the plugin loader for resources.
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
getPluginResource | ( | $resource | ) |
Get a registered plugin resource.
string | $resourceName |
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
getPluginResourceNames | ( | ) |
Retrieve plugin resource names.
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
getPluginResources | ( | ) |
Retrieve all plugin resources.
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
getResource | ( | $name | ) |
Retrieve a resource from the container.
During bootstrap resource initialization, you may return a value. If you do, it will be stored in the container. You can use this method to retrieve that value.
If no value was returned, this will return a null value.
string | $name |
hasOption | ( | $key | ) |
Is an option present?
string | $key |
hasPluginResource | ( | $resource | ) |
Is the requested plugin resource registered?
string | $resource |
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
hasResource | ( | $name | ) |
Determine if a resource has been stored in the container.
During bootstrap resource initialization, you may return a value. If you do, it will be stored in the container. You can use this method to determine if a value was stored.
string | $name |
mergeOptions | ( | array | $array1, |
$array2 = null |
|||
) |
Merge options recursively.
array | $array1 | |
mixed | $array2 |
registerPluginResource | ( | $resource, | |
$options = null |
|||
) |
Register a new resource plugin.
string | Zend_Application_Resource_Resource | $resource | |
mixed | $options |
Zend_Application_Bootstrap_Exception | When invalid resource is provided |
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
setApplication | ( | $application | ) |
Set application/parent bootstrap.
Zend_Application | Zend_Application_Bootstrap_Bootstrapper | $application |
setContainer | ( | $container | ) |
Set resource container.
By default, if a resource callback has a non-null return value, this value will be stored in a container using the resource name as the key.
Containers must be objects, and must allow setting public properties.
object | $container |
setOptions | ( | array | $options | ) |
setPluginLoader | ( | Zend_Loader_PluginLoader_Interface | $loader | ) |
Set plugin loader for loading resources.
Zend_Loader_PluginLoader_Interface | $loader |
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
unregisterPluginResource | ( | $resource | ) |
Unregister a resource from the bootstrap.
string | Zend_Application_Resource_Resource | $resource |
Zend_Application_Bootstrap_Exception | When unknown resource type is provided |
Implements Zend_Application_Bootstrap_ResourceBootstrapper.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |