Application/Bootstrap/BootstrapAbstract.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Application
- Subpackage
- Bootstrap
- Version
- $Id$
\Zend_Application_Bootstrap_BootstrapAbstract
Package: Zend_Application\BootstrapAbstract base class for bootstrap classes
- Implements
- Children
- \Zend_Application_Bootstrap_Bootstrap
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
-
- Uses
-
Properties
array $_optionKeys = array()
Flattened (lowercase) option keys used for lookups
Default valuearray()
Details- Type
- array
array $_pluginResources = array()
Class-based resource plugins
Default valuearray()
Details- Type
- array
array $_run = array()
Initializers that have been run
Default valuearray()
Details- Type
- array
array $_started = array()
Initializers that have been started but not yet completed (circular dependency detection)
Default valuearray()
Details- Type
- array
Methods
__call(string $method, array $args) : void
Overloading: intercept calls to bootstrap() methods
ParametersName | Type | Description |
---|
$method | string | |
---|
$args | array | |
---|
Throws __get(string $prop) : null | mixed
Implement PHP's magic to retrieve a ressource
in the bootstrap
ParametersName | Type | Description |
---|
$prop | string | |
---|
ReturnsType | Description |
---|
null | mixed | |
__isset(string $prop) : bool
Implement PHP's magic to ask for the
existence of a ressource in the bootstrap
ParametersName | Type | Description |
---|
$prop | string | |
---|
Returns _markRun(string $resource) : void
Mark a resource as having run
ParametersName | Type | Description |
---|
$resource | string | |
---|
_resolvePluginResourceName(\Zend_Application_Resource_Resource $resource) : string
Resolve 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.
ParametersReturnsbootstrap(null | string | array $resource = null) : \Zend_Application_Bootstrap_BootstrapAbstract
finalBootstrap 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.
ParametersName | Type | Description |
---|
$resource | null | string | array | |
---|
ReturnsThrowsgetClassResources() : array
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.
ReturnsgetResource(string $name) : null | mixed
Retrieve 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.
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsType | Description |
---|
null | mixed | |
hasPluginResource(string $resource) : bool
Is the requested plugin resource registered?
ParametersName | Type | Description |
---|
$resource | string | |
---|
Returns hasResource(string $name) : bool
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 {@link setContainer() container}.
You can use this method to determine if a value was stored.
ParametersName | Type | Description |
---|
$name | string | |
---|
ReturnsmergeOptions(array $array1, mixed $array2 = null) : array
Merge options recursively
ParametersName | Type | Description |
---|
$array1 | array | |
---|
$array2 | mixed | |
---|
Returns