Hi Fabian,
your scenario only works, when the normal helper functions will be
moved to static class methods. In your case, you could use every class
which symfony could find (and that would be many when autoloading is
not limited). I think this fact would break everything (.
But when we would switch to this behaviour:
$urlHelper = $sf_helper->get('url')
You only would search for sf*Helper or maybe my*Helper classes within
this sfHelper class and you would contain the helpers area.
- Frank
Am 06.07.2008 um 18:16 schrieb Fabian Lange:
>
> Hi Guys,
>
> I am still suffering to understand why we need more magic here.
>
> Lets imagine this template:
>
> <?php echo sfAssets::ImageTag('symfony.png') ?>
>
> The developer wanted here an image called symfony.png
>
> Now as we are smart we move all our images to a CDN:
>
> <?php
> class flCDN {
> static public function ImageTag($s){
> return sfAssets::ImageTag('http://akami.xyz/smart/guy/'.$s);
> }
> }
>
> And we reload the page. Nothing happens!
> That's right because the template still says to use the sfAssets. Well
> that's not what we want so we do a global search for
> sfAssets::ImageTag and
> replace it with flCDN::ImageTag
>
> <?php echo flCDN::ImageTag('symfony.png') ?>
>
> Everything works fine now. Problems solved.
>
> Which use case is this solution missing?
> The only Problem we are addressing at the moment is the namespace
> pollution.
> I cannot see anything that is required additionally to that.
> Or can anybody supply me a use case?
>
> .: Fabian
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---