Class Zend_Environment

Description
  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Environment.php (line 36)

Zend_Environment_Container_Abstract
   |
   --Zend_Environment
Variable Summary
 mixed $_cache
Method Summary
 void __construct (array $modules, [array $config = array()])
 string|boolean match (array $locations, [string $server = null], [string $ip = null])
 string toFile (string $path, [ $text = null], Zend_View_Abstract $view)
 string toHtml ([ $view = null], [string $script = 'Html.php'])
 string toText ([ $view = null], [string $script = 'Text.php'])
 string _cache (string $id, string $value)
 Zend_View_Abstract _getDefaultView ()
 string _render (Zend_View_Abstract $view, string $script)
Variables
mixed $_cache (line 41)

Optional cache instance.

  • access: protected
mixed $_cachePrefix = '_zf_environment_' (line 46)

Cache prefix (to avoid namespace clashes).

  • access: protected

Inherited Variables

Inherited from Zend_Environment_Container_Abstract

Zend_Environment_Container_Abstract::$_data
Zend_Environment_Container_Abstract::$_ptr
Methods
Constructor __construct (line 54)
  • access: public
  • throws: Zend_Environment_Exception
void __construct (array $modules, [array $config = array()])
  • array $modules
  • array $config
match (line 165)

Returns a string identifier associated to a specific environment.

Zend Environment can determine which 'environment' a current webserver is running by parsing an array of identifiers and hostnames. Returns a string on success or an exception if the location cannot be determined. Each location can be specified by a string (or array of strings) with a regular expression (no delimiter necessary). The server's hostname, address and port number are used for matching.

E.g. $locations = array('live' => array('www.site.com', '192.168.1.0/24'), 'staging' => array('*.site.com', 'site.staging.com'), 'development' => 'www.site.test'); $environment_id = Zend_Environment::match($locations);

  • access: public
  • throws: Zend_Environment_Exception
string|boolean match (array $locations, [string $server = null], [string $ip = null])
  • array $locations
  • string $server
  • string $ip
toFile (line 130)

Sends formatted text-only output of the environment to a file.

Will create a default text view if no text is provided.

  • access: public
string toFile (string $path, [ $text = null], Zend_View_Abstract $view)
  • string $path
  • Zend_View_Abstract $view
  • $text
toHtml (line 103)

Passes the environment to a Zend_View to format as a whole HTML page (using the default HTML renderer) or to a user-supplied Zend_View.

  • access: public
string toHtml ([ $view = null], [string $script = 'Html.php'])
  • Zend_View_Abstract $view
  • string $script
toText (line 116)

Passes the environment to a Zend_View to format as a whole Text page (using the default Text renderer) or to a user-supplied Zend_View.

  • access: public
string toText ([ $view = null], [string $script = 'Text.php'])
  • Zend_View_Abstract $view
  • string $script
_cache (line 275)

Save contents of operation to cache if it has been instantiated.

  • access: protected
string _cache (string $id, string $value)
  • string $id
  • string $value
_getDefaultView (line 261)

Creates instance of default environment view.

  • access: protected
Zend_View_Abstract _getDefaultView ()
_render (line 246)

Internal method to retrieve environment view.

  • access: protected
string _render (Zend_View_Abstract $view, string $script)
  • Zend_View_Abstract $view
  • string $script

Inherited Methods

Inherited From Zend_Environment_Container_Abstract

 Zend_Environment_Container_Abstract::asArray()
 Zend_Environment_Container_Abstract::count()
 Zend_Environment_Container_Abstract::current()
 Zend_Environment_Container_Abstract::key()
 Zend_Environment_Container_Abstract::next()
 Zend_Environment_Container_Abstract::rewind()
 Zend_Environment_Container_Abstract::valid()
 Zend_Environment_Container_Abstract::__get()
 Zend_Environment_Container_Abstract::__isset()
 Zend_Environment_Container_Abstract::__set()

Documentation generated on Wed, 21 Feb 2007 12:02:26 -0800 by phpDocumentor 1.3.1