Overview

Namespaces

  • None
  • PHP
  • Pry
    • Auth
      • Interfaces
    • Config
    • Controller
    • Date
    • Db
    • Feed
      • Abstracts
      • Writers
    • File
      • Decorator
    • Form
      • Element
    • Image
    • Log
      • Writer
    • Net
      • Exception
    • Session
    • Util
    • Validate
      • Validator
    • View

Classes

  • Bench
  • CommandLineBuilder
  • Pagination
  • Registry
  • Strings
  • Token
  • UserAgent

Exceptions

  • ExceptionHandler
  • Overview
  • Namespace
  • Class
  • Tree

Class Registry

Generic storage class helps to manage global data.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Pry\Util\Registry
Namespace: Pry\Util
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( Pry\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
$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 = '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
$registryClassName

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
$index - 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
$index The location in the ArrayObject in which to store the value.
$value
mixed
$value 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
$index

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
$array data array
$flags
integer
$flags ArrayObject flags

Overrides

ArrayObject::__construct()
public
# offsetExists( string $index )

Parameters

$index
string
$index

Returns

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

Overrides

ArrayObject::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 API documentation generated by ApiGen 2.8.0