Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Abstract base class for bootstrap classes
Zend_Application|Zend_Application_Bootstrap_Bootstrapper $_application = ''
Detailsarray $_classResources = ''
Detailsobject $_container = ''
Detailsstring $_environment = ''
Detailsarray $_optionKeys = 'array'Flattened (lowercase) option keys used for lookups
Detailsarray $_options = 'array'
DetailsZend_Loader_PluginLoader_Interface $_pluginLoader = ''
Detailsarray $_pluginResources = 'array'
Detailsarray $_run = 'array'
Detailsarray $_started = 'array'
Details__call(
string $method, array $args
)
:
voidOverloading: intercept calls to bootstrap<resourcename>() methods
Details__construct(
Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
)
:
voidConstructor
Sets application object, initializes options, and prepares list of initializer methods.
Details__get(
string $prop
)
:
null|mixedImplement PHP's magic to retrieve a ressource in the bootstrap
Details__isset(
string $prop
)
:
boolImplement PHP's magic to ask for the existence of a ressource in the bootstrap
Details_bootstrap(
null|string|array $resource
=
null
)
:
voidBootstrap implementation
This method may be overridden to provide custom bootstrapping logic. It is the sole method called by {@link bootstrap()}.
Details_executeResource(
string $resource
)
:
voidExecute 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.
Details_loadPluginResource(
string $resource, array|object|null $options
)
:
string|falseLoad a plugin resource
Details_markRun(
string $resource
)
:
voidMark a resource as having run
Details_resolvePluginResourceName(
Zend_Application_Resource_Resource $resource
)
:
stringResolve a plugin resource name
Uses, in order of preference - $_explicitType property of resource - Short name of resource (if a matching prefix path is found) - class name (if none of the above are true)
The name is then cast to lowercase.
Detailsbootstrap(
null|string|array $resource
=
null
)
:
Zend_Application_Bootstrap_BootstrapAbstractBootstrap 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 {@link _bootstrap()} method.
DetailsgetApplication(
)
:
Zend_Application|Zend_Application_Bootstrap_BootstrapperRetrieve parent application instance
DetailsgetClassResourceNames(
)
:
arrayGet class resource names
DetailsgetClassResources(
)
:
arrayGet 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.
DetailsgetContainer(
)
:
objectRetrieve resource container
DetailsgetEnvironment(
)
:
stringRetrieve application environment
DetailsgetOption(
string $key
)
:
mixedRetrieve a single option
DetailsgetOptions(
)
:
arrayGet current options from bootstrap
DetailsgetPluginLoader(
)
:
Zend_Loader_PluginLoader_InterfaceGet the plugin loader for resources
DetailsgetPluginResource(
$resource
)
:
Zend_Application_Resource_ResourceGet a registered plugin resource
DetailsgetPluginResourceNames(
)
:
arrayRetrieve plugin resource names
DetailsgetPluginResources(
)
:
arrayRetrieve all plugin resources
DetailsgetResource(
string $name
)
:
null|mixedRetrieve a resource from the container
During bootstrap resource initialization, you may return a value. If you do, it will be stored in the {@link setContainer() container}. You can use this method to retrieve that value.
If no value was returned, this will return a null value.
DetailshasOption(
string $key
)
:
boolIs an option present?
DetailshasPluginResource(
string $resource
)
:
boolIs the requested plugin resource registered?
DetailshasResource(
string $name
)
:
boolDetermine 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 {@link setContainer() container}. You can use this method to determine if a value was stored.
DetailsmergeOptions(
array $array1, mixed $array2
=
null
)
:
arrayMerge options recursively
DetailsregisterPluginResource(
string|Zend_Application_Resource_Resource $resource, mixed $options
=
null
)
:
Zend_Application_Bootstrap_BootstrapAbstractRegister a new resource plugin
DetailssetApplication(
Zend_Application|Zend_Application_Bootstrap_Bootstrapper $application
)
:
Zend_Application_Bootstrap_BootstrapAbstractSet application/parent bootstrap
DetailssetContainer(
object $container
)
:
Zend_Application_Bootstrap_BootstrapAbstractSet 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.
DetailssetOptions(
array $options
)
:
Zend_Application_Bootstrap_BootstrapAbstractSet class state
DetailssetPluginLoader(
Zend_Loader_PluginLoader_Interface $loader
)
:
Zend_Application_Bootstrap_BootstrapAbstractSet plugin loader for loading resources
DetailsunregisterPluginResource(
string|Zend_Application_Resource_Resource $resource
)
:
Zend_Application_Bootstrap_BootstrapAbstractUnregister a resource from the bootstrap
Details