Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Static Public Member Functions | Public Attributes | Static Protected Attributes | List of all members
eZExtension Class Reference

The class eZExtension does. More...

## Static Public Member Functions
static | baseDirectory (eZINI|null $siteINI=null)
static | activeExtensions ( $extensionType=false, eZINI|null $siteINI=null)
static | extensionOrdering (array $activeExtensions)
static | activateExtensions ( $extensionType='default', ?eZINI $siteINI=null)
static | prependExtensionSiteAccesses ( $accessName=false, $ini=false, $globalDir=true, $identifier=null, $order=true)
static | prependSiteAccess ( $extension, $accessName=false, $ini=false, $globalDir=true, $identifier=null)
static | expandedPathList ( $extensionList, $subdirectory=false)
static | findExtensionType ( $parameters, &$out)
static | extensionInfo ( $extension)
static | nameFromPath ( $path)
static | isExtension ( $path)
static | getHandlerClass (ezpExtensionOptions $options)
static | clearActiveExtensionsMemoryCache ()
static | clearActiveExtensionsCache ()

## Public Attributes
const | CACHE_DIR = 'var/cache/'

## Static Protected Attributes
static | $activeExtensionsCache = array()

## Detailed Description

The class eZExtension does.

Definition at line 17 of file ezextension.php.

## Member Function Documentation

## ◆ activateExtensions()

static eZExtension::activateExtensions | ( |  | $extensionType = `'default'`,
|  | ?eZINI | $siteINI = `null`
| ) |  |
| static

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

Parameters

  string | $extensionType | See eZExtension::activeExtensions(), value of false is deprecated as of 4.4
  eZINI | null | $siteINI | Optional parameter to be able to only do change on specific instance of site.ini

Definition at line 187 of file ezextension.php.

References activeExtensions(), baseDirectory(), prependSiteAccess(), and eZDebug\writeStrict().

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

## ◆ activeExtensions()

static eZExtension::activeExtensions | ( |  | $extensionType = `false`,
|  | eZINI|null | $siteINI = `null`
| ) |  |
| static

Return an array with activated extensions.

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

Parameters

  bool | string | $extensionType | Decides 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
  eZINI | null | $siteINI | Optional parameter to be able to only do change on specific instance of site.ini

Returns
  array

Definition at line 60 of file ezextension.php.

References baseDirectory(), extensionOrdering(), and eZDebug\writeError().

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

## ◆ baseDirectory()

static eZExtension::baseDirectory | ( | eZINI|null | $siteINI = `null` | ) |
| static

return the base directory for extensions

Parameters

  eZINI | null | $siteINI | Optional parameter to be able to only do change on specific instance of site.ini

Returns
  string

Definition at line 39 of file ezextension.php.

Referenced by activateExtensions(), activeExtensions(), eZModule\activeModuleRepositories(), eZNotificationEventFilter\availableHandlers(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZContentObjectEditHandler\executeHandlerFunction(), expandedPathList(), eZRSSImport\fieldMap(), eZFilePackageHandler\fileExists(), findExtensionType(), eZContentUpload\findHandler(), eZSiteAccess\findPathToSiteAccess(), eZDataType\getDBAExtensionFilePath(), eZExtensionPackageHandler\handleAddParameters(), eZCollaborationItemHandler\handlerRepositories(), eZContentObjectEditHandler\initialize(), eZDataType\loadAndRegisterType(), eZNotificationEventType\loadAndRegisterType(), eZWorkflowType\loadAndRegisterType(), eZShippingManager\loadBasketInfoHandler(), eZExtensionPackageCreator\loadExtensionName(), eZNotificationEventFilter\loadHandler(), eZShippingManager\loadShippingHandler(), eZTSTranslator\loadTranslationFile(), eZVATManager\loadVATHandler(), nameFromPath(), and prependSiteAccess().

## ◆ clearActiveExtensionsCache()

static eZExtension::clearActiveExtensionsCache | ( |  | ) |
| static

Clears (removes) active extension cache files from the cache folder.

Returns
  void

Definition at line 648 of file ezextension.php.

References eZFileHandler\instance().

Referenced by eZCache\clearActiveExtensions().

## ◆ clearActiveExtensionsMemoryCache()

static eZExtension::clearActiveExtensionsMemoryCache | ( |  | ) |
| static

Clears the active extensions in-memory cache

Returns
  void

Definition at line 639 of file ezextension.php.

Referenced by eZCache\clearActiveExtensions(), and eZSiteAccess\load().

## ◆ expandedPathList()

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 334 of file ezextension.php.

References baseDirectory().

Referenced by eZTemplate\factory(), eZSearch\getEngine(), eZSimpleTagsOperator\initializeIncludes(), eZUserLoginHandler\instance(), and eZCodeMapper\loadTransformationFiles().

## ◆ extensionInfo()

static eZExtension::extensionInfo | ( |  | $extension | ) |
| static

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

Parameters

  extension | name

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

Definition at line 484 of file ezextension.php.

## ◆ extensionOrdering()

static eZExtension::extensionOrdering | ( | array | $activeExtensions | ) |
| static

Returns the provided array reordered with loading order information taken into account.

See also
  activeExtensions

Parameters

  array | $activeExtensions | Array of extensions.

Definition at line 143 of file ezextension.php.

Referenced by activeExtensions().

## ◆ findExtensionType()

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 385 of file ezextension.php.

References baseDirectory(), and eZDebug\writeWarning().

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

## ◆ getHandlerClass()

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,and | ezpExtensionOptions 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 531 of file ezextension.php.

References eZDebug\writeError(), and eZDebug\writeNotice().

Referenced by eZContentCacheManager\clearNodeViewCacheArray(), eZImageManager\factoryFor(), eZContentCacheManager\generateObjectViewCache(), eZXMLText\inputHandler(), eZDB\instance(), eZClusterFileHandler\instance(), eZPackageCreationHandler\instance(), eZBinaryFileHandler\instance(), eZPackageInstallationHandler\instance(), eZXMLText\outputHandler(), eZPackage\packageHandler(), eZContentObjectTreeNode\removeThis(), and eZMailTransport\send().

## ◆ isExtension()

static eZExtension::isExtension | ( |  | $path | ) |
| static

Returns
  true if this path is related to some extension.

Parameters

  $path | Path to check.

Note
  The root of an extension is considered to be in this path too.

Definition at line 514 of file ezextension.php.

References nameFromPath().

## ◆ nameFromPath()

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

  $path | Path to check.

Definition at line 496 of file ezextension.php.

References baseDirectory(), and eZDir\cleanPath().

Referenced by isExtension().

## ◆ prependExtensionSiteAccesses()

static eZExtension::prependExtensionSiteAccesses | ( |  | $accessName = `false`,
|  |  | $ini = `false`,
|  |  | $globalDir = `true`,
|  |  | $identifier = `null`,
|  |  | $order = `true`
| ) |  |
| static

Prepend extension siteaccesses

Parameters

  string | false | $accessName | Optional access name, will use global if false
  eZINI | false | null | $ini |
  true | $globalDir |
  | string|false|null | See eZExtension::prependSiteAccess()
  bool | $order | Prepend extensions in reverse order by setting this to false

Definition at line 229 of file ezextension.php.

References activeExtensions(), and prependSiteAccess().

Referenced by eZSiteAccess\change().

## ◆ prependSiteAccess()

static eZExtension::prependSiteAccess | ( |  | $extension,
|  |  | $accessName = `false`,
|  |  | $ini = `false`,
|  |  | $globalDir = `true`,
|  |  | $identifier = `null`
| ) |  |
| static

Prepend siteaccess for specified extension

Parameters

  string | $extension | Name of extension (folder name)
  string | false | $accessName | Optional access name, will use global if false
  eZINI | false | null | $ini |
  true | $globalDir |
  string | false | null | $identifier | By setting to string "siteaccess" only one location is supported (identifier makes eZINI overwrite earlier prepends with same key) null(default) means "ext-siteaccess:$extension" is used to only have one pr extension

Definition at line 255 of file ezextension.php.

References baseDirectory().

Referenced by activateExtensions(), and prependExtensionSiteAccesses().

## Member Data Documentation

## ◆ $activeExtensionsCache

eZExtension::$activeExtensionsCache = array()
| static protected

Definition at line 31 of file ezextension.php.

## ◆ CACHE_DIR

const eZExtension::CACHE_DIR = 'var/cache/'

Definition at line 24 of file ezextension.php.

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

- ezextension.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.