Application.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 [email protected] 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
- Version
- $Id$
\Zend_Application
Package: Zend_Application
Throws
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods
__construct(string $environment, string | array | \Zend_Config $options = null) : void
Constructor
Initialize application. Potentially initializes include_paths, PHP
settings, and bootstrap class.
ParametersName | Type | Description |
---|---|---|
$environment | string | |
$options | string | array | \Zend_Config | String path to configuration file, or array/Zend_Config of configuration options |
Exception | Description |
---|---|
\Zend_Application_Exception | When invalid options are provided |
_loadConfig(string $file) : array
Load configuration file of options
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$file | string |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Application_Exception | When invalid configuration file is provided |
bootstrap(null | string | array $resource = null) : \Zend_Application
Bootstrap application
Parameters
Returns
Name | Type | Description |
---|---|---|
$resource | null | string | array |
Type | Description |
---|---|
\Zend_Application |
getAutoloader() : \Zend_Loader_Autoloader
Retrieve autoloader instance
Returns
Type | Description |
---|---|
\Zend_Loader_Autoloader |
getBootstrap() : \Zend_Application_Bootstrap_BootstrapAbstract
Get bootstrap object
Returns
Type | Description |
---|---|
\Zend_Application_Bootstrap_BootstrapAbstract |
getOption(string $key) : mixed
Retrieve a single option
Parameters
Returns
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed |
hasOption(string $key) : bool
Is an option present?
Parameters
Returns
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
bool |
mergeOptions(array $array1, mixed $array2 = null) : array
Merge options recursively
Parameters
Returns
Name | Type | Description |
---|---|---|
$array1 | array | |
$array2 | mixed |
Type | Description |
---|---|
array |
setAutoloaderNamespaces(array $namespaces) : \Zend_Application
Set autoloader namespaces
Parameters
Returns
Name | Type | Description |
---|---|---|
$namespaces | array |
Type | Description |
---|---|
\Zend_Application |
setBootstrap(string $path, string $class = null) : \Zend_Application
Set bootstrap path/class
Parameters
Returns
Name | Type | Description |
---|---|---|
$path | string | |
$class | string |
Type | Description |
---|---|
\Zend_Application |
setIncludePaths(array $paths) : \Zend_Application
Set include path
Parameters
Returns
Name | Type | Description |
---|---|---|
$paths | array |
Type | Description |
---|---|
\Zend_Application |
setOptions(array $options) : \Zend_Application
Set application options
Parameters
Returns
Throws
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Application |
Exception | Description |
---|---|
\Zend_Application_Exception | When no bootstrap path is provided |
\Zend_Application_Exception | When invalid bootstrap information are provided |
setPhpSettings(array $settings, string $prefix = '') : \Zend_Application
Set PHP configuration settings
Parameters
Returns
Name | Type | Description |
---|---|---|
$settings | array | |
$prefix | string | Key prefix to prepend to array values (used to map . separated INI values) |
Type | Description |
---|---|
\Zend_Application |