TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Package Class Reference
Inheritance diagram for Package:
PackageInterface

Public Member Functions

 __construct (PackageManager $packageManager, $packageKey, $packagePath)
 
 isPartOfFactoryDefault ()
 
 isPartOfMinimalUsableSystem ()
 
 getPackageKey ()
 
 isProtected ()
 
 setProtected ($protected)
 
 getPackagePath ()
 
 getPackageMetaData ()
 
 getPackageReplacementKeys ()
 
 getValueFromComposerManifest ($key=null)
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 loadFlagsFromComposerManifest ()
 

Protected Attributes

 $extensionManagerConfiguration = []
 
 $classAliases
 
 $partOfFactoryDefault = false
 
 $partOfMinimalUsableSystem = false
 
 $packageKey
 
 $packagePath
 
 $protected = false
 
 $composerManifest
 
 $packageMetaData
 
 $packageManager
 

Additional Inherited Members

- Public Attributes inherited from PackageInterface
const PATTERN_MATCH_PACKAGEKEY = '/^[a-z0-9]+\.(?:[a-z0-9][\.a-z0-9]*)+$/i'
 
const PATTERN_MATCH_EXTENSIONKEY = '/^[0-9a-z_-]+$/i'
 

Detailed Description

A Package representing the details of an extension and/or a composer package Adapted from FLOW for TYPO3 CMS

Definition at line 23 of file Package.php.

Constructor & Destructor Documentation

__construct ( PackageManager  $packageManager,
  $packageKey,
  $packagePath 
)

Constructor

Parameters
PackageManager$packageManagerthe package manager which knows this package
string$packageKeyKey of this package
string$packagePathAbsolute path to the location of the package's composer manifest
Exceptions
ExceptionInvalidPackageKeyException if an invalid package key was passed
ExceptionInvalidPackagePathException if an invalid package path was passed
ExceptionInvalidPackageManifestException if no composer manifest file could be found

Definition at line 95 of file Package.php.

References Package\$packageKey, Package\$packageManager, Package\$packagePath, PackageManager\getComposerManifest(), PackageManager\isPackageKeyValid(), and Package\loadFlagsFromComposerManifest().

Member Function Documentation

__sleep ( )

Added by TYPO3 CMS

The package caching serializes package objects. The package manager instance may not be serialized as a fresh instance is created upon every request.

This method will be removed once the package is released of the package manager dependency.

Returns
array

Definition at line 273 of file Package.php.

__wakeup ( )

Added by TYPO3 CMS

The package caching deserializes package objects. A fresh package manager instance has to be set during bootstrapping.

This method will be removed once the package is released of the package manager dependency.

Definition at line 290 of file Package.php.

References $GLOBALS.

getPackageKey ( )

Returns the package key of this package.

Returns
string

Implements PackageInterface.

Definition at line 153 of file Package.php.

getPackageMetaData ( )

Returns the package meta data object of this package.

Returns
MetaData

Implements PackageInterface.

Definition at line 197 of file Package.php.

getPackagePath ( )

Returns the full path to this package's main directory

Returns
string Path to this package's main directory

Implements PackageInterface.

Definition at line 187 of file Package.php.

getPackageReplacementKeys ( )

Returns an array of packages this package replaces

Returns
array

Implements PackageInterface.

Definition at line 234 of file Package.php.

getValueFromComposerManifest (   $key = null)

Returns contents of Composer manifest - or part there of if a key is given.

Parameters
string$keyOptional. Only return the part of the manifest indexed by 'key'
Returns
mixed|NULL
See also
json_decode for return values

Implements PackageInterface.

Definition at line 247 of file Package.php.

Referenced by Package\loadFlagsFromComposerManifest().

isPartOfFactoryDefault ( )
Returns
bool

Implements PackageInterface.

Definition at line 134 of file Package.php.

isPartOfMinimalUsableSystem ( )
Returns
bool

Implements PackageInterface.

Definition at line 142 of file Package.php.

isProtected ( )

Tells if this package is protected and therefore cannot be deactivated or deleted

Returns
bool

Implements PackageInterface.

Definition at line 164 of file Package.php.

loadFlagsFromComposerManifest ( )
protected

Loads package management related flags from the "extra:typo3/cms:Package" section of extensions composer.json files into local properties

Returns
void

Definition at line 119 of file Package.php.

References Package\getValueFromComposerManifest().

Referenced by Package\__construct().

setProtected (   $protected)

Sets the protection flag of the package

Parameters
bool$protectedTRUE if the package should be protected, otherwise FALSE
Returns
void

Implements PackageInterface.

Definition at line 176 of file Package.php.

Member Data Documentation

$classAliases
protected

Definition at line 33 of file Package.php.

$composerManifest
protected

Definition at line 72 of file Package.php.

$extensionManagerConfiguration = []
protected

Definition at line 28 of file Package.php.

$packageKey
protected

Definition at line 55 of file Package.php.

Referenced by Package\__construct().

$packageManager
protected

Definition at line 83 of file Package.php.

Referenced by Package\__construct().

$packageMetaData
protected

Definition at line 78 of file Package.php.

$packagePath
protected

Definition at line 61 of file Package.php.

Referenced by Package\__construct().

$partOfFactoryDefault = false
protected

Definition at line 41 of file Package.php.

$partOfMinimalUsableSystem = false
protected

Definition at line 49 of file Package.php.

$protected = false
protected

Definition at line 67 of file Package.php.