API Documentation

Zend/Application.php

Show: inherited
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 license@zend.com 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 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Application

Package: Zend\Application

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_Loader_Autoloader  $_autoloader= ''

Autoloader to use

Propertyprotected\Zend_Application_Bootstrap_BootstrapAbstract  $_bootstrap= ''

Bootstrap

Propertyprotectedstring  $_environment= ''

Application environment

Details
Type
string
Propertyprotectedarray  $_optionKeys= 'array()'

Flattened (lowercase) option keys

Default valuearray()Details
Type
array
Propertyprotectedarray  $_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
Name Type Description
$environment string
$options string|array|\Zend_Config

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

Throws
Exception Description
\Zend_Application_Exception When invalid options are provided
methodprotected_loadConfig( string $file ) : array

Load configuration file of options

Parameters
Name Type Description
$file string
Returns
Type Description
array
Throws
Exception Description
\Zend_Application_Exception When invalid configuration file is provided
methodpublicbootstrap( null|string|array $resource = null ) : \Zend_Application

Bootstrap application

Parameters
Name Type Description
$resource null|string|array
Returns
Type Description
\Zend_Application
methodpublicgetAutoloader( ) : \Zend_Loader_Autoloader

Retrieve autoloader instance

Returns
Type Description
\Zend_Loader_Autoloader
methodpublicgetBootstrap( ) : \Zend_Application_Bootstrap_BootstrapAbstract

Get bootstrap object

methodpublicgetEnvironment( ) : string

Retrieve current environment

Returns
Type Description
string
methodpublicgetOption( string $key ) : mixed

Retrieve a single option

Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetOptions( ) : array

Retrieve application options (for caching)

Returns
Type Description
array
methodpublichasOption( string $key ) : bool

Is an option present?

Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublicmergeOptions( array $array1, mixed $array2 = null ) : array

Merge options recursively

Parameters
Name Type Description
$array1 array
$array2 mixed
Returns
Type Description
array
methodpublicrun( ) : void

Run the application

methodpublicsetAutoloaderNamespaces( array $namespaces ) : \Zend_Application

Set autoloader namespaces

Parameters
Name Type Description
$namespaces array
Returns
Type Description
\Zend_Application
methodpublicsetBootstrap( string $path, string $class = null ) : \Zend_Application

Set bootstrap path/class

Parameters
Name Type Description
$path string
$class string
Returns
Type Description
\Zend_Application
methodpublicsetIncludePaths( array $paths ) : \Zend_Application

Set include path

Parameters
Name Type Description
$paths array
Returns
Type Description
\Zend_Application
methodpublicsetOptions( array $options ) : \Zend_Application

Set application options

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Application
Throws
Exception Description
\Zend_Application_Exception When no bootstrap path is provided
\Zend_Application_Exception When invalid bootstrap information are provided
methodpublicsetPhpSettings( array $settings, string $prefix = '' ) : \Zend_Application

Set PHP configuration settings

Parameters
Name Type Description
$settings array
$prefix string

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

Returns
Type Description
\Zend_Application
Documentation was generated by DocBlox 0.15.1.