PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Setting Values in the Registry

Use the static method set() to store an entry in the registry.

Example 684. Example of set() Method Usage

<?php
Zend_Registry
::set('index'$value);

The value returned can be an object, an array, or a scalar. You can change the value stored in a specific entry of the registry by calling the set() method to set the entry to a new value.

The index can be a scalar (NULL, string, or number), like an ordinary array.

Zend Framework