Class Zend

Description

Utility class for common functions.

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

Located in /Zend.php (line 37)


	
			
Method Summary
 static boolean compareVersion (string $version)
 static string dump (mixed $var, [string $label = null], [ $echo = true])
 static Zend_Registry initRegistry ([mixed $registry = 'Zend_Registry'])
 static boolean isReadable (string $filename)
 static boolean isRegistered (string $index)
 static void loadClass (string $class, [string|array $dirs = null])
 static mixed loadFile (string $filename, [string|array $dirs = null], [boolean $once = false])
 static void loadInterface ( $class, [ $dirs = null])
 static void register (mixed $index, $newval $newval)
 static mixed registry ([string $index = null])
 static void __unsetRegistry ()
Methods
static compareVersion (line 238)

Compare the specified ZF $version with the current Zend::VERSION of the ZF.

  • return: -1 if the $version is older, 0 if they are the same, and +1 if $version is newer
  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Version::compareVersion() instead.
static boolean compareVersion (string $version)
  • string $version: A version identifier for the ZF (e.g. "0.7.1")
static dump (line 223)

Debug helper function. This is a wrapper for var_dump() that adds the <pre /> tags, cleans up newlines and indents, and runs htmlentities() before output.

  • access: public
  • deprecated: since 0.9.0
static string dump (mixed $var, [string $label = null], [ $echo = true])
  • mixed $var: The variable to dump.
  • string $label: An optional label.
  • $echo
static initRegistry (line 192)

Initialize the registry. Invoking this method more than once will generate an exception.

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Registry::setClassName() instead.
static Zend_Registry initRegistry ([mixed $registry = 'Zend_Registry'])
  • mixed $registry: - Either a name of the registry class (Zend_Registry, or a subclass) or an instance of Zend_Registry (or subclass)
static isReadable (line 124)

Returns TRUE if the $filename is readable, or FALSE otherwise. This function uses the PHP include_path, where PHP's is_readable() does not.

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Loader::isReadable() instead.
static boolean isReadable (string $filename)
  • string $filename
static isRegistered (line 176)

Returns TRUE if the $index is a named value in the registry, or FALSE if $index was not found in the registry.

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Registry::isRegistered() instead.
static boolean isRegistered (string $index)
  • string $index
static loadClass (line 67)

Loads a class from a PHP file. The filename must be formatted as "$class.php".

If $dirs is a string or an array, it will search the directories in the order supplied, and attempt to load the first matching file.

If $dirs is null, it will split the class name at underscores to generate a path hierarchy (e.g., "Zend_Example_Class" will map to "Zend/Example/Class.php").

If the file was not found in the $dirs, or if no $dirs were specified, it will attempt to load it from PHP's include_path.

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Loader::loadClass() instead.
  • throws: Zend_Exception
static void loadClass (string $class, [string|array $dirs = null])
  • string $class:
    • The full class name of a Zend component.
  • string|array $dirs: - OPTIONAL either a path or array of paths to search
static loadFile (line 108)

Loads a PHP file. This is a wrapper for PHP's include() function.

$filename must be the complete filename, including any extension such as ".php". Note that a security check is performed that does not permit extended characters in the filename. This method is intended for loading Zend Framework files.

If $dirs is a string or an array, it will search the directories in the order supplied, and attempt to load the first matching file.

If the file was not found in the $dirs, or if no $dirs were specified, it will attempt to load it from PHP's include_path.

If $once is TRUE, it will use include_once() instead of include().

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Loader::loadFile() instead.
  • throws: Zend_Exception
static mixed loadFile (string $filename, [string|array $dirs = null], [boolean $once = false])
  • string $filename
  • string|array $dirs: - OPTIONAL either a path or array of paths to search
  • boolean $once
static loadInterface (line 79)

Loads an interface from a PHP file

  • access: public
  • deprecated: Since 0.6
static void loadInterface ( $class, [ $dirs = null])
  • $class
  • $dirs
static register (line 140)

offsetSet stores $newval at key $index

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Registry::set() instead.
static void register (mixed $index, $newval $newval)
  • mixed $index: index to set
  • $newval $newval: new value to store at offset $index
static registry (line 160)

registry() retrieves the value stored at an index.

If the $index argument is NULL or not specified, this method returns the registry object (iterable).

  • return: The registered value for $index.
  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Registry::get() instead.
  • throws: Zend_Registry_Exception
  • see: Zend::register()
static mixed registry ([string $index = null])
  • string $index: The name for the value.
static __unsetRegistry (line 205)

primarily for tearDown() in unit tests

  • access: public
  • deprecated: Since 0.9.0 -- Use Zend_Registry::_unsetInstance() instead.
static void __unsetRegistry ()

Documentation generated on Fri, 06 Apr 2007 18:32:52 -0700 by phpDocumentor 1.3.1