code proposal to pear/Cache

[email protected] (ivo nascimento) Mon, 15 Aug 2011 08:52:26 -0300
Newsgroups php.pear.qa
Message-ID <CALAEc113Zg1oReYdEsJGw9Z06WU5aeDdA1W9M=-xv51JmKm1fQ@mail.gmail.com>
Hi,
I start working in without maintainer package pear/Cache to suggest code
features I will use in future patchs ( if approved )
The goal is provide functions to distribute the responsibility and in the
future give me resources to align it with my pear2/cache proposal.

here the list of changes I made:
 - add setAllowedOptions function
 - Add getAllowedOptions function
 - change construct of all Containers to use those 2 methods in your
configuration
 - change the signature of constructor to turn $options a null parameter
instead ''
 - change the return value of setOptions to get some information about set
options process ( now it return true|false value to inform if all parameters
you set is valid in front of allowedoptions)
 - add a test to manage the containers type, so, if you try to retrieve a
instance of a no covered cache type will receive a Pear_Cache_Error

thanks in advance.


-- 
Ivo Nascimento - Iann
-------------------------------------------------
   http://about.me/ivonascimento
-------------------------------------------------