Forums / Developer / Coding standard question about autoloads
Jean-Yves Zinsou
Wednesday 19 August 2009 9:29:38 am
Hi to all, I am rewriting one of my extension following the ezcomponents coding standards.A question that i could not answer clearly :
I have a module that uses a class defined in a class directory in the extension.
The coding standard says not to use include_once and rely on php 5's autoload function.Where am i supposed to put the file that contains my autoload array ?
In the autoload directory of the extension ?
thanx for any answer..
Jey
Do Androids Dream of Electric Sheep? I dream of eZpubliSheep.... ------------------------------------------------------------------------ http://www.alma.fr
André R.
Wednesday 19 August 2009 11:55:11 am
Unless your writing a component, then you don't need to think about that, let the eZ Publish autoload system handle it. No autoload array needed, just press the button in admin or use the bin script to regenerate it when you add a class / extension.
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Wednesday 19 August 2009 1:47:47 pm
Thanks !