eZ Publish  [4.2]
eZExtension Class Reference

The class eZExtension does. More...

List of all members.

Public Member Functions

 eZExtension ()

Static Public Member Functions

static activateExtensions ($extensionType=false)
static activeExtensions ($extensionType=false)
static baseDirectory ()
static expandedPathList ($extensionList, $subdirectory=false)
static extensionInfo ($extension)
static findExtensionType ($parameters, &$out)
static getHandlerClass (ezpExtensionOptions $options)
 Returns the correct handler defined in $iniFile configuration file A correct class name for the handler needs to be specified in the ini settings, and the class needs to be present for the autoload system.
static isExtension ($path)
static nameFromPath ($path)
static prependExtensionSiteAccesses ($accessName=false, $ini=false, $globalDir=true, $identifier=false, $order=true)
static prependSiteAccess ($extension, $accessName=false, $ini=false, $globalDir=true, $identifier=false)

Detailed Description

The class eZExtension does.

Definition at line 40 of file ezextension.php.


Member Function Documentation

static eZExtension::activateExtensions ( extensionType = false) [static]

Will make sure that all extensions that has settings directories are added to the eZINI override list.

Definition at line 98 of file ezextension.php.

Referenced by eZScript\initialize(), and eZSiteAccess\reInitialise().

static eZExtension::activeExtensions ( extensionType = false) [static]
Returns:
an array with extensions that has been activated.
Parameters:
$extensionTypeDecides which extension to include in the list, the follow values are possible.
  • false - Means add both default and access extensions
  • 'default' - Add only default extensions
  • 'access' - Add only access extensions

Default extensions are those who are loaded before a siteaccess are determined while access extensions are loaded after siteaccess is set.

Definition at line 71 of file ezextension.php.

Referenced by activateExtensions(), eZModule\activeModuleRepositories(), checkSiteaccess(), eZContentUpload\findHandler(), eZSiteAccess\findPathToSiteAccess(), eZDataType\getDBAExtensionFilePath(), eZPaymentGatewayType\loadAndRegisterExtensionGateways(), and prependExtensionSiteAccesses().

static eZExtension::expandedPathList ( extensionList,
subdirectory = false 
) [static]

Generates a list with expanded paths and returns it. The paths are expanded to where the extensions are placed. Optionally a subdirectory of the extension may be set using $subdirectory.

Definition at line 180 of file ezextension.php.

Referenced by eZSearch\getEngine(), eZSimpleTagsOperator\initializeIncludes(), eZUserLoginHandler\instance(), eZUser\instance(), eZCodeMapper\loadTransformationFiles(), eZURLAliasFilter\processFilters(), and templateInit().

static eZExtension::extensionInfo ( extension) [static]

Read extension information. Returns extension information array specified in feature request 9371. ( http://issues.ez.no/9371 )

Parameters:
extensionname
Returns:
Extension information array. null if extension is not found, or does not contain extension information.

Definition at line 330 of file ezextension.php.

eZExtension::eZExtension ( )

Constructor

Definition at line 45 of file ezextension.php.

static eZExtension::findExtensionType ( parameters,
&$  out 
) [static]

This is help function for searching for extension code. It will read ini variables defined in $parameters, search trough the specified directories for specific files and set the result in $out.

The $parameters parameter must contain the following entries.

  • ini-name - The name of the ini file which has the settings, must include the .ini suffix.
  • repository-group - The INI group which has the basic repository settings.
  • repository-variable - The INI variable which has the basic repository settings.
  • extension-group - The INI group which has the extension settings.
  • extension-variable - The INI variable which has the extension settings.
  • subdir - A subdir which will be appended to all repositories searched for, can be left out.
  • extension-subdir - A subdir which will be appended to all extension repositories searched for, can be left out.
  • suffix-name - A suffix which will be appended after the file searched for.
  • type-directory - Whether the type has a directory for it's file or not. Default is true.
  • type - The type to look for, it will try to find a file named repository/subdir/type/type-suffix or if type-directory is false repository/subdir/type-suffix. If type is not specified the type-group and type-variable may be used for fetching the current type.
  • type-group - The INI group which has the type setting.
  • type-variable - The INI variable which has the type setting.
  • alias-group - The INI group which defines type aliases, see below.
  • alias-variable - The INI variable which defines type aliases.

Type aliases allows overriding a specific type to use another type handler, this is useful when extensions want to take control of some specific types or you want multiple names (aliases) for one type.

On success the $out parameter will contain:

  • type - The current type used.
  • original-type - The original type, if aliasing was used it may differ from type.
  • found-file-dir - The directory where the type was found.
  • found-file-path - The full path to the type.
  • found-file-name - The filename of the type.
Returns:
true if the extension type was found.

Definition at line 231 of file ezextension.php.

Referenced by eZImageAnalyzer\create(), eZShopAccountHandler\instance(), eZConfirmOrderHandler\instance(), and eZBinaryFile\metaData().

static eZExtension::getHandlerClass ( ezpExtensionOptions $  options) [static]

Returns the correct handler defined in $iniFile configuration file A correct class name for the handler needs to be specified in the ini settings, and the class needs to be present for the autoload system.

Parameters:
object$options,andezpExtensionOptions object
Returns:
null|false|object Returns a valid handler object, null if setting did not exists and false if no handler was found

Definition at line 392 of file ezextension.php.

Referenced by eZDFSFileHandler\__construct(), eZDBFileHandler\eZDBFileHandler(), eZImageManager\factoryFor(), eZXMLText\inputHandler(), eZClusterFileHandler\instance(), eZDB\instance(), eZBinaryFileHandler\instance(), eZPackageInstallationHandler\instance(), eZPackageCreationHandler\instance(), eZXMLText\outputHandler(), eZPackage\packageHandler(), and eZMailTransport\send().

static eZExtension::isExtension ( path) [static]
Returns:
true if this path is related to some extension.
Parameters:
$pathPath to check.
Note:
The root of an extension is considered to be in this path too.

Definition at line 375 of file ezextension.php.

static eZExtension::nameFromPath ( path) [static]

eZExtension::nameFromPath( __FILE__ ) executed in any file of an extension can help you to find the path to additional resources

Returns:
Name of the extension a path belongs to.
Parameters:
$pathPath to check.

Definition at line 357 of file ezextension.php.

Referenced by isExtension(), and isExtension().

static eZExtension::prependExtensionSiteAccesses ( accessName = false,
ini = false,
globalDir = true,
identifier = false,
order = true 
) [static]

Prepend extension siteaccesses

Parameters:
accessNamesiteaccess name ( default false )

Definition at line 133 of file ezextension.php.

Referenced by eZINI\findInputFiles(), and eZSiteAccess\reInitialise().

static eZExtension::prependSiteAccess ( extension,
accessName = false,
ini = false,
globalDir = true,
identifier = false 
) [static]

Prepend siteaccess for specified extension.

Parameters:
$extensionname

Definition at line 155 of file ezextension.php.

Referenced by activateExtensions(), and prependExtensionSiteAccesses().


The documentation for this class was generated from the following file: