[Solar-talk] Quick thoughts on new factory() method instantiation

Paul M Jones pmjones at ciaweb.net
Wed Jan 3 09:33:39 PST 2007


On Dec 13, 2006, at 7:10 AM, Rodrigo Moraes wrote:

> On 12/11/06, Paul M Jones wrote:
>> Of the remaining two, I like solarFactory() better.  The property
>> idea seems a bit too loose, even for me.
>
> +1 solarFactory().
>
> A method named factory() can exist in other external libraries, as
> happened to Travis. However Solar::factory() would not be used for
> external libs unless the constructor follow Solar's constructors, and
> then, for classes made to work with Solar, perhaps it would be ok to
> just avoid methods named factory(). But I like the idea of prefixing
> with 'solar' because it tells that it is a method that Solar will try
> to evoque, and would avoid conflicts with non-Solar classes.

Agreed; just committed to SVN.  Thanks for the feedback.  :-)




--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.  <http://solarphp.com>

Join the Solar community wiki!  <http://solarphp.org>

Savant: The simple, elegant, and powerful solution for
templates in PHP.  <http://phpsavant.com>




More information about the solar-talk mailing list