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




More information
Related Books
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...

Pro Zend Framework Techniques: Build a Full CMS Project (Expert's Voice)

Pro Zend Framework Techniques: Build a Full CMS Project (Expert's Voice)

The Zend Framework is a truly amazing PHP–based web application development framework and...
Browse Articles
Ajax (4), Amazon (1), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (8), onbeforeunload (1), OOP (1), PHP (35), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (2), SimpleXML (1), Smarty (5), SOAP (2), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (7), Zend_Loader (1), Zend_Registry (1), Zend_Search_Lucene (1)

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