PhpRiot
Download Article
Download this article or the entire “Zend Framework 101” series with all listings and files.




More information
Related Books
Zend Framework, A Beginner's Guide

Zend Framework, A Beginner's Guide

Essential Skills--Made Easy! Leverage the power of the Zend Framework to supercharge...

Zend Framework 1.8 Web Application Development

Zend Framework 1.8 Web Application Development

Design, develop, and deploy feature-rich PHP web applications with this MVC framework...
PhpRiot Newsletter
Your Email Address:

More information

Zend Framework 101: Zend_Registry

This article is part of the series “Zend Framework 101”. The Zend Framework 101 series covers many components that make up the Zend Framework in easy to understand articles.. Read more about Zend Framework 101...

Introduction

In this article in the Zend Framework 101 series I will introduce you to the Zend_Registry class. This class used is to allow you manage variables and objects in the global application namespace. This is used as an alternative to using global variables in PHP. I will show you how to use the Zend_Registry class and also provide a practical example of where it would be useful to use the registry.

When you register a variable it is only available for the duration of the current request / script execution.

This article requires Zend Framework, downloadable from http://framework.zend.com. At time of writing, the current version of Zend Framework is 1.7.6.

In This Article