Question about classes folder of custom extension

Author Message

John Moritz

Friday 03 July 2009 7:12:23 pm

I made a custom extension where i have some .php class files. I placed this files on the classes folder of my extension. On the Module script i have included the class file with:

include_once( 'extension/name/classes/class.php' );

After searchin for some errors i commented this line out. What i am wondering now is the fact, that the class ist still included!

So my question is, when i place a class file on the classes folder, is there any ezPublish functionality which includes this file automaticly? And if yes, which script can use the classes? Is it possible that a second extension can use classes of the first without including the file manually? Is it available on the whole installation?

It´s 4.1.2.
I am a little bit confused.

Heath

Friday 03 July 2009 10:47:49 pm

I think your looking for ...

<i>bin/php/ezpgenerateautoloads.php</i>

<i>bin/php/ezcache.php</i>

I think you can comment out your include_once/etc.

eZ Publish has an autoload system to load php classes.

Regenerate the autoload array for extensions

The autoload system has also some changes, for example the autoload array for extensions is now placed in var/autoload of your eZ Publish installation (along teh class changes in extensions itself).

To regenerate the autoload array, execute the following script from

php bin/php/ezpgenerateautoloads.php --extension

Clearing the caches

Whenever an eZ Publish solution is upgraded, all caches must be cleared in a proper way. This should be done from within a system shell:

Navigate into the eZ Publish 4.1 directory. Run the script using the following shell command:

php bin/php/ezcache.php --clear-all --purge

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

John Moritz

Saturday 04 July 2009 1:44:38 am

Wow, thats awesome!
i Took a look at var/autoload and now it dawns to me.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.