-- Jack Sleight <[EMAIL PROTECTED]> wrote
(on Thursday, 28 June 2007, 03:02 PM -0700):
> Hmmm, well, the fact that it is a global in the example I gave isn't actually
> relevant to the concept I was trying to suggest. What I meant by "Application
> Variables" is variables that not only persist over multiple requests (session
> variables) but also persist across all sessions. They could be used to store a
> particular object that all users/sessions could access, for example a list of
> users currently logged into a chat room application. Its basically a storage
> mechanism for data/variables that all users of the website/application have
> access to, like a database, but without the database. From the article I
> posted: "Application variables in ASP work very similar to the $_SESSION
> variable in PHP. However, unlike the $_SESSION variable, application variables
> are not specific to an individual user; they persist across every user of 
> every
> page on the web site."

To expand on what Bill mentioned previously, the combination of
Zend_Config + Zend_Cache + Zend_Registry would accomplish the same
functionality:

 * Zend_Config for the actual variable storage.
 * Zend_Cache for caching to disk (or database) between requests
 * Zend_Registry to make it globally available in the application

Basically, everything you need is already present.

> PotatoBob wrote:
> >  I don't think so, there really isn't a need for it with all the current
> >  features... Registry etc... Another reason is it looks like bad practice to
> >  me to add any more global variables.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to