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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Application
- Version
- $Id: Application.php 25024 2012-07-30 15:08:15Z rob $
\Zend_Application
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_optionKeys = array()Flattened (lowercase) option keys
array()Details- Type
- array
Methods

__construct(string $environment, string | array | \Zend_Config $options = null) : voidConstructor
Initialize application. Potentially initializes include_paths, PHP settings, and bootstrap class.
| Name | 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) : arrayLoad configuration file of options
| 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_ApplicationBootstrap application
| Name | Type | Description |
|---|---|---|
| $resource | null | string | array |
| Type | Description |
|---|---|
| \Zend_Application |

getAutoloader() : \Zend_Loader_AutoloaderRetrieve autoloader instance
| Type | Description |
|---|---|
| \Zend_Loader_Autoloader |

getBootstrap() : \Zend_Application_Bootstrap_BootstrapAbstractGet bootstrap object
| Type | Description |
|---|---|
| \Zend_Application_Bootstrap_BootstrapAbstract |

getOption(string $key) : mixedRetrieve a single option
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| mixed |

hasOption(string $key) : boolIs an option present?
| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| bool |

mergeOptions(array $array1, mixed $array2 = null) : arrayMerge options recursively
| Name | Type | Description |
|---|---|---|
| $array1 | array | |
| $array2 | mixed |
| Type | Description |
|---|---|
| array |

setAutoloaderNamespaces(array $namespaces) : \Zend_ApplicationSet autoloader namespaces
| Name | Type | Description |
|---|---|---|
| $namespaces | array |
| Type | Description |
|---|---|
| \Zend_Application |

setBootstrap(string $path, string $class = null) : \Zend_ApplicationSet bootstrap path/class
| Name | Type | Description |
|---|---|---|
| $path | string | |
| $class | string |
| Type | Description |
|---|---|
| \Zend_Application |

setIncludePaths(array $paths) : \Zend_ApplicationSet include path
| Name | Type | Description |
|---|---|---|
| $paths | array |
| Type | Description |
|---|---|
| \Zend_Application |

setOptions(array $options) : \Zend_ApplicationSet application options
| 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_ApplicationSet PHP configuration settings
| Name | Type | Description |
|---|---|---|
| $settings | array | |
| $prefix | string | Key prefix to prepend to array values (used to map . separated INI values) |
| Type | Description |
|---|---|
| \Zend_Application |