Public Member Functions | Protected Member Functions | Protected Attributes

Zend_Application Class Reference

Public Member Functions

 __construct ($environment, $options=null)
 getEnvironment ()
 getAutoloader ()
 setOptions (array $options)
 getOptions ()
 hasOption ($key)
 getOption ($key)
 mergeOptions (array $array1, $array2=null)
 setPhpSettings (array $settings, $prefix= '')
 setIncludePaths (array $paths)
 setAutoloaderNamespaces (array $namespaces)
 setBootstrap ($path, $class=null)
 getBootstrap ()
 bootstrap ($resource=null)
 run ()

Protected Member Functions

 _loadConfig ($file)

Protected Attributes

 $_autoloader
 $_bootstrap
 $_environment
 $_optionKeys = array()
 $_options = array()

Detailed Description

Definition at line 28 of file Application.php.


Constructor & Destructor Documentation

__construct ( environment,
options = null 
)

Constructor

Initialize application. Potentially initializes include_paths, PHP settings, and bootstrap class.

Parameters:
string$environment
string | array | Zend_Config$optionsString path to configuration file, or array/Zend_Config of configuration options
Exceptions:
Zend_Application_ExceptionWhen invalid options are provided
Returns:
void

Definition at line 76 of file Application.php.


Member Function Documentation

_loadConfig ( file ) [protected]

Load configuration file of options

Parameters:
string$file
Exceptions:
Zend_Application_ExceptionWhen invalid configuration file is provided
Returns:
array

Definition at line 368 of file Application.php.

bootstrap ( resource = null )

Bootstrap application

Parameters:
null | string | array$resource
Returns:
Zend_Application

Definition at line 345 of file Application.php.

getAutoloader (  )

Retrieve autoloader instance

Returns:
Zend_Loader_Autoloader

Definition at line 111 of file Application.php.

getBootstrap (  )

Get bootstrap object

Returns:
Zend_Application_Bootstrap_BootstrapAbstract

Definition at line 331 of file Application.php.

getEnvironment (  )

Retrieve current environment

Returns:
string

Definition at line 101 of file Application.php.

getOption ( key )

Retrieve a single option

Parameters:
string$key
Returns:
mixed

Definition at line 212 of file Application.php.

getOptions (  )

Retrieve application options (for caching)

Returns:
array

Definition at line 190 of file Application.php.

hasOption ( key )

Is an option present?

Parameters:
string$key
Returns:
bool

Definition at line 201 of file Application.php.

mergeOptions ( array $  array1,
array2 = null 
)

Merge options recursively

Parameters:
array$array1
mixed$array2
Returns:
array

Definition at line 229 of file Application.php.

run (  )

Run the application

Returns:
void

Definition at line 356 of file Application.php.

setAutoloaderNamespaces ( array $  namespaces )

Set autoloader namespaces

Parameters:
array$namespaces
Returns:
Zend_Application

Definition at line 285 of file Application.php.

setBootstrap ( path,
class = null 
)

Set bootstrap path/class

Parameters:
string$path
string$class
Returns:
Zend_Application

Definition at line 303 of file Application.php.

setIncludePaths ( array $  paths )

Set include path

Parameters:
array$paths
Returns:
Zend_Application

Definition at line 272 of file Application.php.

setOptions ( array $  options )

Set application options

Parameters:
array$options
Exceptions:
Zend_Application_ExceptionWhen no bootstrap path is provided
Zend_Application_ExceptionWhen invalid bootstrap information are provided
Returns:
Zend_Application

Definition at line 124 of file Application.php.

setPhpSettings ( array $  settings,
prefix = '' 
)

Set PHP configuration settings

Parameters:
array$settings
string$prefixKey prefix to prepend to array values (used to map . separated INI values)
Returns:
Zend_Application

Definition at line 252 of file Application.php.


The documentation for this class was generated from the following file: