Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Application Class Reference

Public Member Functions

 __construct ($environment, $options=null)
 Constructor.
 
 getEnvironment ()
 Retrieve current environment.
 
 getAutoloader ()
 Retrieve autoloader instance.
 
 setOptions (array $options)
 Set application options.
 
 getOptions ()
 Retrieve application options (for caching)
 
 hasOption ($key)
 Is an option present?
 
 getOption ($key)
 Retrieve a single option.
 
 mergeOptions (array $array1, $array2=null)
 Merge options recursively.
 
 setPhpSettings (array $settings, $prefix= '')
 Set PHP configuration settings.
 
 setIncludePaths (array $paths)
 Set include path.
 
 setAutoloaderNamespaces (array $namespaces)
 Set autoloader namespaces.
 
 setBootstrap ($path, $class=null)
 Set bootstrap path/class.
 
 getBootstrap ()
 Get bootstrap object.
 
 bootstrap ($resource=null)
 Bootstrap application.
 
 run ()
 Run the application.
 

Protected Member Functions

 _loadConfig ($file)
 Load configuration file of options.
 

Protected Attributes

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

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

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
bootstrap (   $resource = null)

Bootstrap application.

Parameters
null | string | array$resource
Returns
Zend_Application
getAutoloader ( )

Retrieve autoloader instance.

Returns
Zend_Loader_Autoloader
getBootstrap ( )

Get bootstrap object.

Returns
Zend_Application_Bootstrap_BootstrapAbstract
getEnvironment ( )

Retrieve current environment.

Returns
string
getOption (   $key)

Retrieve a single option.

Parameters
string$key
Returns
mixed
getOptions ( )

Retrieve application options (for caching)

Returns
array
hasOption (   $key)

Is an option present?

Parameters
string$key
Returns
bool
mergeOptions ( array  $array1,
  $array2 = null 
)

Merge options recursively.

Parameters
array$array1
mixed$array2
Returns
array
run ( )

Run the application.

Returns
void
setAutoloaderNamespaces ( array  $namespaces)

Set autoloader namespaces.

Parameters
array$namespaces
Returns
Zend_Application
setBootstrap (   $path,
  $class = null 
)

Set bootstrap path/class.

Parameters
string$path
string$class
Returns
Zend_Application
setIncludePaths ( array  $paths)

Set include path.

Parameters
array$paths
Returns
Zend_Application
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
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

Member Data Documentation

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