Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Exponential 4 autoload generation

In Exponential 4 we use the PHP 5 autoload feature to load classes. This means that when new classes are introduced to the system, the autoload arrays need to be updated.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/features/4.0/autoload.txt

Exponential 4 autoload generation
================================

In Exponential 4 we use the PHP 5 autoload feature to load classes. This means 
that when new classes are introduced to the system, the autoload arrays need 
to be updated.

There are several situations when a user might want to regenerate the 
autoload-arrays:

1. After upgrading Exponential, to recognise new classes in the Exponential 
kernel

2. When adding a new extension to the site, its classes must be made 
available to Exponential.

Generating updated autoload arrays
----------------------------------

The user has two ways of accessing the autoload generation script, the first 
which gives full control is via the command-line script (Help output included
below)

bin/php/ezpgenerateautoloads.php
::

	Usage: $ bin/php/ezpgenerateautoloads.php [-h] [-t "autoload"] [-v] [-n] [-k] [-e] [--exclude <string>]  [[--] <args>]
	Autoload file generator.

	-h / --help       Show help information
	-t / --target     The directory to where the generated autoload file should be
	                  written.
	-v / --verbose    Whether or not to display more information.
	-n / --dry-run    Whether a new file autoload file should be written.
	-k / --kernel     If an autoload array for the kernel files should be generated.
	-e / --extension  If an autoload array for the extensions should be generated.
	--exclude         Folders to exclude from the class search.

The alternate way is in the Admin interface, in the Setup / Extensions view. 
Which allows the user to regenerate autoload arrays for newly activated 
extensions.

There is an important difference between the two methods. The former will 
generate autoload arrays for all classes found in the kernel and/or extension 
directories. Depending on run-mode. If an extension should not be included in 
the autoload generation it must be added to the exclude parameter.

The extension view will only generate autoload arrays for activated 
extensions, as it will check which extensions to include for you.

Something wrong on this page? Report an error

Documentation license

This page was inherited from the documentation of the original software. It is not covered by the GNU Free Documentation License; it is distributed under the GNU General Public License, version 2.

Copyright (C) 1999 - 2014 eZ Systems AS and contributors