[Solar-talk] Move Solar.php to Solar/Solar.php ?
Paul M Jones
pmjones at ciaweb.net
Wed Sep 5 19:28:02 CDT 2007
On Sep 5, 2007, at 6:37 PM, Travis Swicegood wrote:
> On Sep 5, 2007, at 6:21 PM, Paul M Jones wrote:
>
>> On Sep 5, 2007, at 3:45 PM, Clay Loveless wrote:
>>
>>> One thing to consider (perhaps) -- is Solar.php even necessary
>>> anymore?
>>>
>>> With Solar's spl_autoload support, a lot of what's in Solar.php
>>> be moved into Solar_Base?
>>>
>>> I haven't thought that idea through all the way, but this might
>>> be an opportunity to kill 2 birds with one stone (get rid of the
>>> big-parent-static-method-thing, and play nice with
>>> svn:externals), *without* breaking the naming convention.
>>
>> That's an interesting idea.
>>
>> On initial consideration, I'm not sure that we *can* get rid of
>> it. Solar::factory() and Solar::dependency() and Solar::registry
>> (), for example, are key underpinnings. Having to type a longer
>> prefix class-name would be a bit of a hassle. (Yes, I know that
>> "more to type" is not a good reason, but still.)
>
> If you move to spl_autoload code (which isn't a bad idea to begin
> with as has been hashed and re-hashed on pear-dev recently),
We have in fact already moved to it. :-)
> you could just as easily name it Solar_Framework and be done with
> it. That would make the code much more understandable for someone
> looking at it for the first time to:
>
> Solar::start()
> Solar_Framework::start()
Seeing and typing Solar_Framework::factory() everywhere is enough to
make me not want to do that. :-(
--
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