eZ Publish  [trunk]
eZExtension Class Reference

The class eZExtension does. More...

List of all members.

Public Member Functions

 eZExtension ()

Static Public Member Functions

static activateExtensions ($extensionType= 'default', eZINI $siteINI=null)
 Will make sure that all extensions that has settings directories are added to the eZINI override list.
static activeExtensions ($extensionType=false, eZINI $siteINI=null)
 Return an array with activated extensions.
static baseDirectory (eZINI $siteINI=null)
 return the base directory for extensions
static clearActiveExtensionsMemoryCache ()
 Clears the active extensions in-memory cache.
static expandedPathList ($extensionList, $subdirectory=false)
static extensionInfo ($extension)
static extensionOrdering (array $activeExtensions)
 Returns the provided array reordered with loading order information taken into account.
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=null, $order=true)
 Prepend extension siteaccesses.
static prependSiteAccess ($extension, $accessName=false, $ini=false, $globalDir=true, $identifier=null)
 Prepend siteaccess for specified extension.

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

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$extensionTypeSee eZExtension::activeExtensions(), value of false is deprecated as of 4.4
eZINI | null$siteINIOptional parameter to be able to only do change on specific instance of site.ini

Definition at line 194 of file ezextension.php.

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

static eZExtension::activeExtensions ( extensionType = false,
eZINI 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:
false | string$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
eZINI | null$siteINIOptional parameter to be able to only do change on specific instance of site.ini
Returns:
array

Definition at line 67 of file ezextension.php.

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

static eZExtension::baseDirectory ( eZINI siteINI = null) [static]

Clears the active extensions in-memory cache.

Returns:
void

Definition at line 584 of file ezextension.php.

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

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

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

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

Referenced by getExtensionsInfo().

static eZExtension::extensionOrdering ( array $  activeExtensions) [static]

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

See also:
activeExtensions
Parameters:
array$activeExtensionsArray of extensions.

Definition at line 150 of file ezextension.php.

Referenced by activeExtensions().

Constructor

Definition at line 36 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 340 of file ezextension.php.

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

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

Referenced by isExtension(), and isExtension().

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

Prepend extension siteaccesses.

Parameters:
string | false$accessNameOptional access name, will use global if false
eZINI | false | null$ini
true$globalDir
string|false|nullSee eZExtension::prependSiteAccess()
bool$orderPrepend extensions in reverse order by setting this to false

Definition at line 236 of file ezextension.php.

Referenced by eZSiteAccess\change(), changeSiteAccessSetting(), and eZINI\findInputFiles().

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

Prepend siteaccess for specified extension.

Parameters:
string$extensionName of extension (folder name)
string | false$accessNameOptional access name, will use global if false
eZINI | false | null$ini
true$globalDir
string | false | null$identifierBy 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 262 of file ezextension.php.

Referenced by activateExtensions(), and prependExtensionSiteAccesses().


Member Data Documentation

eZExtension::$activeExtensionsCache = array() [static, protected]

Definition at line 31 of file ezextension.php.

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: