1.7. Zend::register()
Anterior | Capítulo 1. Zend | Próxima

## 1.7. Zend::register()

Registers an object in the object store.

    <?php

    Zend::register($name, $object)

    ?>

The registry is a mechanism for providing singleton instances of objects to the application space. By storing the object in the registry once, and then retrieving the object from the registry whenever it is needed, the same instance is always returned.

The `$name` is an arbitrary string to name the object in the store. This name will be supplied to `Zend::registry()` to retrieve the object again.

The `$name` argument must be a string, only objects may be stored in the registry, an object can never be removed from the registry, and an instance can only be stored once in the registry. Failure to obey these rules will result in `Zend_Exception` being thrown.

Anterior | Acima | Próxima
1.6. Zend::dump() | Principal | 1.8. Zend::registry()