Forums / General / Question about classes folder of custom extension

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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 Exponential 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.

Exponential 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 Exponential 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 Exponential solution is upgraded, all caches must be cleared in a proper way. This should be done from within a system shell:

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

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

Cheers,
Heath

7x | https://se7enx.com/
Brookins Consulting | https://brookinsconsulting.com/
Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350
Solutions | https://projects.exponential.earth/users/community/brookins-consulting
eZpedia community documentation project | http://ezpedia.se7enx.com

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.