On Tue, Jun 1, 2010 at 11:10 PM, Tjerk Meesters tjerk.meest...@gmail.comwrote:
I could be wrong here, but I think it's not so much any problem with
require_once as it is to reduce memory consumption while using the
library. This happens when developers only use 30% of the library and
yet the
On 02-06-2010 at 05:10:07 Tjerk Meesters tjerk.meest...@gmail.com wrote:
I could be wrong here, but I think it's not so much any problem with
require_once as it is to reduce memory consumption while using the
library. This happens when developers only use 30% of the library and
yet the whole
On 02-06-2010 at 09:56:23 Robert Goldsmith rgoldsm...@names.co.uk wrote:
I think autoloading is a good idea but please keep in mind that the app
the phptal is being used within may already have autoloading configured.
a prime example would be Zend.
I've used spl_autoload_register(). Does
No idea :)
However, if you allowed for autoloading to be optional then if needed people
could turn it off and replace it with an external system such as Zend's. Maybe
moving the autoloader into its own file and telling people they need to
require_once the file if they wish to use the phptal
Hi,
Zend uses spl_autoload_register() as well I believe, so that should be safe.
The main problem I can see is that if there's an existing __autoload()
function, spl_autoload_register() will replace it (as stated in the
manual). I don't think putting the autoloader in a separate file will
make a
On 02-06-2010 at 10:33:00 Robert Goldsmith rgoldsm...@names.co.uk wrote:
No idea :)
However, if you allowed for autoloading to be optional then if needed
people could turn it off and replace it with an external system such as
Zend's. Maybe moving the autoloader into its own file and
On 02-06-2010 at 10:58:41 Tjerk Meesters tjerk.meest...@gmail.com wrote:
Zend uses spl_autoload_register() as well I believe, so that should be
safe.
The main problem I can see is that if there's an existing __autoload()
function, spl_autoload_register() will replace it (as stated in the
On 02-06-2010 at 11:10:43 Robert Goldsmith rgoldsm...@names.co.uk wrote:
Why would someone choose to replace PHPTAL's autoload with something
else? (I'm not implying it's perfect or such, just wondering what
problem would such option solve).
If people already have autoloader code and wish
I'd have thought that code would do the job assuming it doesn't clobber any
previously registered autoloaders. I'd prefer it wrapped up in a little
function, however, just for convenience :)
By my understanding, you don't need to actually call the autoload method
'__autoload' so you could
2010/6/2 Kornel Lesiński kor...@aardvarkmedia.co.uk:
On 02-06-2010 at 11:10:43 Robert Goldsmith rgoldsm...@names.co.uk wrote:
Why would someone choose to replace PHPTAL's autoload with something
else? (I'm not implying it's perfect or such, just wondering what problem
would such option
require_once PHPTAL.php;
spl_autoload_unregister(array('PHPTAL','autoload'));
// if needed: spl_autoload_register('__autoload');
Would that be OK?
Wouldn't that cause issues when PHPTAL needs to load more classes
during the course of the script's execution?
I think the idea is that this
Kornel, I've noticed this item on phptal.org: Removed all require_once and
switched to autoloading. What are the problems with using require_once?
Roman
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
I could be wrong here, but I think it's not so much any problem with
require_once as it is to reduce memory consumption while using the
library. This happens when developers only use 30% of the library and
yet the whole shebang is loaded on every request ;-)
On Wed, Jun 2, 2010 at 5:20 AM,
13 matches
Mail list logo