Inheritances
Files
Overview
FRAMES
NO FRAMES

Class Zend_Application

Zend_Application
|- class Zend_Application
Defined in line 28 of file Application.php.
CategoryZend
PackageZend_Application
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Instance fields
# $_autoloader Autoloader to use
# $_bootstrap Bootstrap
# $_environment Application environment
# $_optionKeys Flattened (lowercase) option keys
# $_options Options for Zend_Application
Instance methods
+ __construct() Constructor
# _loadConfig() Load configuration file of options
+ bootstrap() Bootstrap application
+ getAutoloader() Retrieve autoloader instance
+ getBootstrap() Get bootstrap object
+ getEnvironment() Retrieve current environment
+ getOption() Retrieve a single option
+ getOptions() Retrieve application options (for caching)
+ hasOption() Is an option present?
+ mergeOptions() Merge options recursively
+ run() Run the application
+ setAutoloaderNamespaces() Set autoloader namespaces
+ setBootstrap() Set bootstrap path/class
+ setIncludePaths() Set include path
+ setOptions() Set application options
+ setPhpSettings() Set PHP configuration settings

Details

Instance fields

$_autoloader
protected $_autoloader
Autoloader to use
$_environment
protected $_environment
Application environment
Var string
$_optionKeys
protected $_optionKeys = array()
Flattened (lowercase) option keys
Var array
$_options
protected $_options = array()
Options for Zend_Application
Var array

Instance methods

__construct()
public function __construct( $environment
$options = null
)
Constructor

Initialize application. Potentially initializes include_paths, PHP
settings, and bootstrap class.
Parameters
string $environment
string|array|Zend_Config $options String path to configuration file, or array/Zend_Config of configuration options
Returns void
Throws Zend_Application_Exception When invalid options are provided
_loadConfig()
protected function _loadConfig( $file)
Load configuration file of options
Parameters
string $file
Returns array
Throws Zend_Application_Exception When invalid configuration file is provided
bootstrap()
public function bootstrap( )
Bootstrap application
getAutoloader()
public function getAutoloader( )
Retrieve autoloader instance
getBootstrap()
public function getBootstrap( )
Get bootstrap object
getEnvironment()
public function getEnvironment( )
Retrieve current environment
Returns string
getOption()
public function getOption( $key)
Retrieve a single option
Parameters
string $key
Returns mixed
getOptions()
public function getOptions( )
Retrieve application options (for caching)
Returns array
hasOption()
public function hasOption( $key)
Is an option present?
Parameters
string $key
Returns bool
mergeOptions()
public function mergeOptions( array $array1
$array2 = null
)
Merge options recursively
Parameters
array $array1
mixed $array2
Returns array
run()
public function run( )
Run the application
Returns void
setAutoloaderNamespaces()
public function setAutoloaderNamespaces( array $namespaces)
Set autoloader namespaces
Parameters
array $namespaces
setBootstrap()
public function setBootstrap( $path
$class = null
)
Set bootstrap path/class
Parameters
string $path
string $class
setIncludePaths()
public function setIncludePaths( array $paths)
Set include path
Parameters
array $paths
setOptions()
public function setOptions( array $options)
Set application options
Parameters
array $options
Throws Zend_Application_Exception When no bootstrap path is provided
Throws Zend_Application_Exception When invalid bootstrap information are provided
setPhpSettings()
public function setPhpSettings( array $settings
$prefix = ''
)
Set PHP configuration settings
Parameters
array $settings
string $prefix Key prefix to prepend to array values (used to map . separated INI values)