Application.php

Show: PublicProtectedPrivateinherited
Table of Contents
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
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotected\Zend_Loader_Autoloader $_autoloader
Autoloader to use
>VPropertyprotected\Zend_Application_Bootstrap_BootstrapAbstract $_bootstrap
Bootstrap
>VPropertyprotectedstring $_environment
Application environment
Details
Type
string
>VPropertyprotectedarray $_optionKeys = array()
Flattened (lowercase) option keys
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_options = array()
Options for Zend_Application
Default valuearray()Details
Type
array

Methods

methodpublic__construct(string $environment, string | array | \Zend_Config $options = null) : void

Constructor

Initialize application. Potentially initializes include_paths, PHP settings, and bootstrap class.
Parameters
NameTypeDescription
$environmentstring
$optionsstring | array | \Zend_Config

String path to configuration file, or array/Zend_Config of configuration options

Throws
ExceptionDescription
\Zend_Application_ExceptionWhen invalid options are provided
methodprotected_loadConfig(string $file) : array

Load configuration file of options

Parameters
NameTypeDescription
$filestring
Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Application_ExceptionWhen invalid configuration file is provided
methodpublicbootstrap(null | string | array $resource = null) : \Zend_Application

Bootstrap application

Parameters
NameTypeDescription
$resourcenull | string | array
Returns
TypeDescription
\Zend_Application
methodpublicgetAutoloader() : \Zend_Loader_Autoloader

Retrieve autoloader instance

Returns
TypeDescription
\Zend_Loader_Autoloader
methodpublicgetEnvironment() : string

Retrieve current environment

Returns
TypeDescription
string
methodpublicgetOption(string $key) : mixed

Retrieve a single option

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
mixed
methodpublicgetOptions() : array

Retrieve application options (for caching)

Returns
TypeDescription
array
methodpublichasOption(string $key) : bool

Is an option present?

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
bool
methodpublicmergeOptions(array $array1, mixed $array2 = null) : array

Merge options recursively

Parameters
NameTypeDescription
$array1array
$array2mixed
Returns
TypeDescription
array
methodpublicrun() : void

Run the application

methodpublicsetAutoloaderNamespaces(array $namespaces) : \Zend_Application

Set autoloader namespaces

Parameters
NameTypeDescription
$namespacesarray
Returns
TypeDescription
\Zend_Application
methodpublicsetBootstrap(string $path, string $class = null) : \Zend_Application

Set bootstrap path/class

Parameters
NameTypeDescription
$pathstring
$classstring
Returns
TypeDescription
\Zend_Application
methodpublicsetIncludePaths(array $paths) : \Zend_Application

Set include path

Parameters
NameTypeDescription
$pathsarray
Returns
TypeDescription
\Zend_Application
methodpublicsetOptions(array $options) : \Zend_Application

Set application options

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Application
Throws
ExceptionDescription
\Zend_Application_ExceptionWhen no bootstrap path is provided
\Zend_Application_ExceptionWhen invalid bootstrap information are provided
methodpublicsetPhpSettings(array $settings, string $prefix = '') : \Zend_Application

Set PHP configuration settings

Parameters
NameTypeDescription
$settingsarray
$prefixstring

Key prefix to prepend to array values (used to map . separated INI values)

Returns
TypeDescription
\Zend_Application
Documentation was generated by phpDocumentor 2.2.0 .