## Zend

Description

Utility class for common functions.

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

Located in /Zend.php (line 37)

Class Constant Summary
VERSION = '0.8.0dev'
Method Summary
static boolean compareVersion (string $version)
static string dump (mixed $var, [string $label = null], [ $echo = true])
static Exception exception (string $class, [string $message = ''], [int $code = 0])
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 414)

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

static boolean compareVersion (string $version)

- string $version: A version identifier for the ZF (e.g. "0.7.1")

static dump (line 378)

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

static string dump (mixed $var, [string $label = null], [ $echo = true])

- mixed $var: The variable to dump.
- string $label: An optional label.
- $echo

static exception (line 248)

Return a new exception

Loads an exception class as specified by $class, and then passes the message and code arguments to the Exception's constructor, returning the new Exception object.

If the exception created is not a true Exception, throws a Zend_Exception indicating an invalid exception class was passed.

Usage:

1. throw Zend::exception('Some_Exception', 'exception message');

- access: public
- deprecated: since 0.6.1
- throws: Zend_Exception when invalid exception class passed

static Exception exception (string $class, [string $message = ''], int $code)

- string $class
- string $message: Defaults to empty string
- int $code: Defaults to 0

static initRegistry (line 327)

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

- access: public

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 202)

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

static boolean isReadable (string $filename)

- string $filename

static isRegistered (line 309)

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

- access: public

static boolean isRegistered (string $index)

- string $index

static loadClass (line 69)

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
- 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 144)

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
- 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 117)

Loads an interface from a PHP file

- access: public
- deprecated: Since 0.6

static void loadInterface ( $class, [ $dirs = null])

- $class
- $dirs

static register (line 271)

offsetSet stores $newval at key $index

- access: public

static void register (mixed $index, $newval $newval)

- mixed $index: index to set
- $newval $newval: new value to store at offset $index

static registry (line 292)

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
- throws: Zend_Registry_Exception
- see: Zend::register()

static mixed registry ([string $index = null])

- string $index: The name for the value.

static __unsetRegistry (line 363)

primarily for tearDown() in unit tests

- access: public

static void __unsetRegistry ()
Class Constants
VERSION = '0.8.0dev' (line 42)

Zend Framework version identification - see compareVersion()

Documentation generated on Wed, 21 Feb 2007 12:01:39 -0800 by phpDocumentor 1.3.1