Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Registry

Classes

  • Util_Registry
  • Overview
  • Package
  • Class
  • Tree

Class Util_Registry

Generic storage class helps to manage global data.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Util_Registry
Package: Zend\Registry
Category: Zend
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Located at Util/Registry.class.php
Methods summary
public static Zend_Registry
# getInstance( )

Retrieves the default registry instance.

Retrieves the default registry instance.

Returns

Zend_Registry
public static
# setInstance( Util_Registry $registry )

Set the default registry instance to a specified instance.

Set the default registry instance to a specified instance.

Parameters

$registry
Zend_Registry
An object instance of type Zend_Registry, or a subclass.

Throws

Exception
if registry is already initialized.
protected static
# init( )

Initialize the default registry instance.

Initialize the default registry instance.

public static
# setClassName( string $registryClassName = 'Util_Registry' )

Set the class name to use for the default registry instance. Does not affect the currently initialized instance, it only applies for the next time you instantiate.

Set the class name to use for the default registry instance. Does not affect the currently initialized instance, it only applies for the next time you instantiate.

Parameters

$registryClassName
string

Throws

Exception
if the registry is initialized or if the class name is not valid.
public static
# _unsetInstance( )

Unset the default registry instance. Primarily used in tearDown() in unit tests.

Unset the default registry instance. Primarily used in tearDown() in unit tests.

Returns

void
public static mixed
# get( string $index )

getter method, basically same as offsetGet().

getter method, basically same as offsetGet().

This method can be called from an object of type Zend_Registry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.

Parameters

$index
string
- get the value associated with $index

Returns

mixed

Throws

OutOfBoundsException
if no entry is registerd for $index.
public static
# set( string $index, mixed $value )

setter method, basically same as offsetSet().

setter method, basically same as offsetSet().

This method can be called from an object of type Zend_Registry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.

Parameters

$index
string
The location in the ArrayObject in which to store the value.
$value
mixed
The object to store in the ArrayObject.
public static boolean
# isRegistered( string $index )

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

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

Parameters

$index
string

Returns

boolean
public
# __construct( array $array = array(), integer $flags = ArrayObject::ARRAY_AS_PROPS )

Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object

Constructs a parent ArrayObject with default ARRAY_AS_PROPS to allow acces as an object

Parameters

$array
array
data array
$flags
integer
ArrayObject flags
public
# offsetExists( string $index )

Parameters

$index
string

Returns

mixed Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960).

Implementation of

ArrayAccess::offsetExists
Methods inherited from ArrayObject
append(), asort(), count(), exchangeArray(), getArrayCopy(), getFlags(), getIterator(), getIteratorClass(), ksort(), natcasesort(), natsort(), offsetGet(), offsetSet(), offsetUnset(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()
Constants inherited from ArrayObject
ARRAY_AS_PROPS, STD_PROP_LIST
Pry Framework API documentation generated by ApiGen 2.6.1