Class Zend

Description

Utility class for common functions.

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

Located in /Zend.php (line 41)


	
			
Method Summary
static string dump (mixed $var, [string $label = null], [ $echo = true])
static boolean isReadable (string $filename)
static boolean isRegistered (string $name)
static void loadClass (string $class, [string $dirs = null])
static void loadFile (string $filename, [ $dirs = null], [boolean $once = false], string|null $directory)
static void loadInterface (string $interface, [string $dirs = null])
static void register (string $name, object $obj)
static object The registry ([string $name = null])
Methods
static method dump (line 242)

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 method isReadable (line 222)

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 method isRegistered (line 314)

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

  • access: public
static boolean isRegistered (string $name)
  • string $name
static method loadClass (line 76)

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 $dirs = null])
  • string $class
  • string $dirs
static method loadFile (line 167)

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 void loadFile (string $filename, [ $dirs = null], [boolean $once = false], string|null $directory)
  • string $filename
  • string|null $directory
  • boolean $once
  • $dirs
static method loadInterface (line 120)

Loads an interface from a PHP file. The filename must be formatted as "$interface.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 interface name at underscores to generate a path hierarchy (e.g., "Zend_Example_Interface" will map to "Zend/Example/Interface.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 loadInterface (string $interface, [string $dirs = null])
  • string $interface
  • string $dirs
static method register (line 282)

Registers a shared object.

  • access: public
  • throws: Zend_Exception
  • todo: use SplObjectStorage if ZF minimum PHP requirement moves up to at least PHP 5.1.0
static void register (string $name, object $obj)
  • string $name: The name for the object.
  • object $obj: The object to register.
static method registry (line 301)

Retrieves a registered shared object, where $name is the registered name of the object to retrieve.

If the $name argument is NULL, an array will be returned where the keys to the array are the names of the objects in the registry and the values are the class names of those objects.

  • return: registered object.
  • access: public
  • throws: Zend_Registry_Exception
  • see: Zend::register()
static object The registry ([string $name = null])
  • string $name: The name for the object.

Documentation generated on Sun, 29 Oct 2006 21:28:04 -0600 by phpDocumentor 1.3.0RC6