PHP Class rex_package_manager, redaxo

Inheritance: use trait rex_factory_trait
Mostrar archivo Open project: redaxo/redaxo Class Usage Examples

Protected Properties

Property Type Description
$generatePackageOrder
$message
$package rex_package

Public Methods

Method Description
activate ( ) : boolean Activates a package.
checkConflicts ( ) : boolean Checks whether the package is in conflict with other packages.
checkDependencies ( ) : boolean Checks if another Package which is activated, depends on the given package.
checkPackageConflict ( string $packageId ) : boolean Checks whether the package is in conflict with another package.
checkPackageRequirement ( string $packageId ) : boolean Checks whether the package requirement is met.
checkRedaxoRequirement ( string $redaxoVersion ) : boolean Checks whether the redaxo requirement is met.
checkRequirements ( ) : boolean Checks whether the requirements are met.
deactivate ( ) : boolean Deactivates a package.
delete ( ) : boolean Deletes a package.
factory ( rex_package $package ) : static Creates the manager for the package.
generatePackageOrder ( ) Generates the package order.
getMessage ( ) : string Returns the message.
install ( boolean $installDump = true ) : boolean Installs a package.
synchronizeWithFileSystem ( ) Synchronizes the packages with the file system.
uninstall ( boolean $installDump = true ) : boolean Uninstalls a package.

Protected Methods

Method Description
__construct ( rex_package $package, string $i18nPrefix ) Constructor.
_delete ( boolean $ignoreState = false ) : boolean Deletes a package.
i18n ( string $key ) : string Translates the given key.
saveConfig ( ) Saves the package config.
wrongPackageId ( string $addonName, string $pluginName = null ) : string

Private Methods

Method Description
matchVersionConstraints ( string $version, string $constraints ) : boolean Checks the version of the requirement.
readPackageFolder ( string $folder ) : string[] Returns the subfolders of the given folder.

Method Details

__construct() protected method

Constructor.
protected __construct ( rex_package $package, string $i18nPrefix )
$package rex_package Package
$i18nPrefix string Prefix for i18n

_delete() protected method

Deletes a package.
protected _delete ( boolean $ignoreState = false ) : boolean
$ignoreState boolean
return boolean TRUE on success, FALSE on error

activate() public method

Activates a package.
public activate ( ) : boolean
return boolean TRUE on success, FALSE on error

checkConflicts() public method

Checks whether the package is in conflict with other packages.
public checkConflicts ( ) : boolean
return boolean

checkDependencies() public method

Checks if another Package which is activated, depends on the given package.
public checkDependencies ( ) : boolean
return boolean

checkPackageConflict() public method

Checks whether the package is in conflict with another package.
public checkPackageConflict ( string $packageId ) : boolean
$packageId string Package ID
return boolean

checkPackageRequirement() public method

Checks whether the package requirement is met.
public checkPackageRequirement ( string $packageId ) : boolean
$packageId string Package ID
return boolean

checkRedaxoRequirement() public method

Checks whether the redaxo requirement is met.
public checkRedaxoRequirement ( string $redaxoVersion ) : boolean
$redaxoVersion string REDAXO version
return boolean

checkRequirements() public method

Checks whether the requirements are met.
public checkRequirements ( ) : boolean
return boolean

deactivate() public method

Deactivates a package.
public deactivate ( ) : boolean
return boolean TRUE on success, FALSE on error

delete() public method

Deletes a package.
public delete ( ) : boolean
return boolean TRUE on success, FALSE on error

factory() public static method

Creates the manager for the package.
public static factory ( rex_package $package ) : static
$package rex_package Package
return static

generatePackageOrder() public static method

Generates the package order.
public static generatePackageOrder ( )

getMessage() public method

Returns the message.
public getMessage ( ) : string
return string

i18n() protected method

Translates the given key.
protected i18n ( string $key ) : string
$key string Key
return string Tranlates text

install() public method

Installs a package.
public install ( boolean $installDump = true ) : boolean
$installDump boolean When TRUE, the sql dump will be importet
return boolean TRUE on success, FALSE on error

saveConfig() protected static method

Saves the package config.
protected static saveConfig ( )

synchronizeWithFileSystem() public static method

Synchronizes the packages with the file system.
public static synchronizeWithFileSystem ( )

uninstall() public method

Uninstalls a package.
public uninstall ( boolean $installDump = true ) : boolean
$installDump boolean When TRUE, the sql dump will be importet
return boolean TRUE on success, FALSE on error

wrongPackageId() abstract protected method

abstract protected wrongPackageId ( string $addonName, string $pluginName = null ) : string
$addonName string
$pluginName string
return string

Property Details

$generatePackageOrder protected_oe property

protected $generatePackageOrder

$message protected_oe property

protected $message

$package protected_oe property

protected rex_package $package
return rex_package