Where is the issue tracker?

The other thing I noticed is that when I loaded Zend Framework into my Zend 
Studio as a separate project, there were a TON of warnings generated on the 
code. I investigated a couple and some of them look like straight up bugs to 
me. Are the developers using Zend Studio also, to parse the code and syntax 
check it all?

I would actually be happy to spend a little time working on this and cleaning 
things up, so what is the normal process of submitting changes? I work using 
Perforce for version control, and I branch all the code into my own dev tree. 
What I used to do when I did Linux development was to merge my changes back 
into the original tree, and then generate a diff of my tree versus the original 
version I imported, and submit that somewhere. Is there a good place to submit 
patches for ZF? Or should I just register as a developer and submit my changes 
into SVN, which I can do also?

Regards,

Kendall Bennett, CEO
A Main Hobbies
424 Otterson Drive, Suite 160
Chico, CA 95928
1-800-705-2215 (Toll-Free)
1-530-894-0797 (Int'l & Local)
1-530-894-9049 (Fax)
http://www.amainhobbies.com


________________________________
From: Matthew Weier O'Phinney <[email protected]>
Date: Sun, 3 May 2009 05:27:53 -0700
To: Zend Framework General <[email protected]>
Subject: Re: [fw-general] Question about plugin helpers?

-- Kendall Bennett <[email protected]> wrote
(on Saturday, 02 May 2009, 03:56 PM -0700):
> Wow. That did not come out formatted correct. Let me re-send this one
> formatted correctly:
>
> I have been stepping through all the Zend Framework code to see how it all
> fits together, and thinking about how it all will affect the performance of
> applications that are written with it, when I came across something that
> looks odd to me in the the Zend_View_Abstract::_getPlugin() implementation.
> Specifically the function is as follows:
>
>     private function _getPlugin($type, $name)
>     {
>         $name = ucfirst($name);
>         switch ($type) {
>             case 'filter':
>                 $storeVar = '_filterClass';
>                 $store    = $this->_filterClass;
>                 break;
>             case 'helper':
>                 $storeVar = '_helper';
>                 $store    = $this->_helper;
>                 break;
>         }
>
>         if (!isset($store[$name])) {
>             $class = $this->getPluginLoader($type)->load($name);
>             $store[$name] = new $class();
>             if (method_exists($store[$name], 'setView')) {
>                 $store[$name]->setView($this);
>             }
>         }
>
>         $this->$storeVar = $store;
>         return $store[$name];
>     }
>
> The thing that has me wondering is the second last line. This line
> re-assigns the $store value into the $this->_helper or $this->_filterClass
> variables. But in the case where the plugin has already been loaded and
> already exists in $store, this is just re-assigning the same value. I don't
> know how PHP optimizes things, but I would expect this would cause the
> entire array to be re-assigned, and the original contents of the array to go
> onto the garbage collection heap. Since the contents have not changes,
> shouldn't this be written this way?
>
>         if (!isset($store[$name])) {
>             $class = $this->getPluginLoader($type)->load($name);
>             $store[$name] = new $class();
>             if (method_exists($store[$name], 'setView')) {
>                 $store[$name]->setView($this);
>             }
>             $this->$storeVar = $store; // Only update the store if it
>                                        // actually changed?
>         }
>
>         return $store[$name];

Yep -- please file an issue in the tracker for this improvement.

--
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to