[Solar-talk] Solar_View_Helper_Js

Clay Loveless clay at killersoft.com
Tue Aug 22 07:52:00 PDT 2006


On Aug 22, 2006, at 7:44 AM, Rodrigo Moraes wrote:

> Clay,
> I found myself in a situation where I couldn't know if the properties
> $files or $scripts from Solar_View_Helper_Js were initialized or not.
> I wanted to increment them, and not depending on the order they were
> called first. So... would it be a bad idea to initialize the array
> when the properties are declared?
>
>  public $files = array();
>  public $scripts = array();

Hi Rodrigo,

The constructor for Solar_View_Helper_Js calls a reset() method,  
which initializes all of the arrays. So, proceed with confidence --  
they're all initialized already the first time you make use of the Js  
helper. :)

Regards,
Clay

--
Killersoft.com





More information about the solar-talk mailing list