TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ExtensionInstaller Class Reference
Inheritance diagram for ExtensionInstaller:

Public Member Functions

 __construct (\Composer\Composer $composer,\Composer\Util\Filesystem $filesystem=NULL)
 
 supports ($packageType)
 
 isInstalled (\Composer\Repository\InstalledRepositoryInterface $repo, PackageInterface $package)
 
 install (\Composer\Repository\InstalledRepositoryInterface $repo, PackageInterface $package)
 
 update (\Composer\Repository\InstalledRepositoryInterface $repo, PackageInterface $initial, PackageInterface $target)
 
 uninstall (\Composer\Repository\InstalledRepositoryInterface $repo, PackageInterface $package)
 
 getInstallPath (PackageInterface $package)
 

Public Attributes

const TYPO3_EXT_DIR = 'ext'
 

Protected Member Functions

 initializeConfiguration ()
 
 initializeExtensionDir ()
 
 installCode (PackageInterface $package)
 
 updateCode (PackageInterface $initial, PackageInterface $target)
 
 removeCode (PackageInterface $package)
 

Protected Attributes

 $extensionDir
 
 $composer
 
 $downloadManager
 
 $filesystem
 
 $pluginConfig
 

Detailed Description

Enter descriptions here

Author
Thomas Maroschik tmaro.nosp@m.schi.nosp@m.k@dfa.nosp@m.u.de

Definition at line 35 of file ExtensionInstaller.php.

Constructor & Destructor Documentation

__construct ( \Composer\Composer  $composer,
\Composer\Util\Filesystem  $filesystem = NULL 
)
Parameters
\Composer\Composer$composer
\Composer\Util\Filesystem$filesystem

Definition at line 68 of file ExtensionInstaller.php.

References ExtensionInstaller\$composer, ExtensionInstaller\$filesystem, ExtensionInstaller\initializeConfiguration(), and ExtensionInstaller\initializeExtensionDir().

Member Function Documentation

getInstallPath ( PackageInterface  $package)

Returns the installation path of a package

Parameters
PackageInterface$package
Returns
string path

Definition at line 172 of file ExtensionInstaller.php.

Referenced by ExtensionInstaller\installCode(), ExtensionInstaller\isInstalled(), ExtensionInstaller\removeCode(), and ExtensionInstaller\updateCode().

initializeConfiguration ( )
protected

Read plugin configuration

Definition at line 80 of file ExtensionInstaller.php.

References Config\load().

Referenced by ExtensionInstaller\__construct().

initializeExtensionDir ( )
protected

Initialize the extension dir based on configuration

Definition at line 87 of file ExtensionInstaller.php.

Referenced by ExtensionInstaller\__construct().

install ( \Composer\Repository\InstalledRepositoryInterface  $repo,
PackageInterface  $package 
)

Installs specific package.

Parameters
\Composer\Repository\InstalledRepositoryInterface$reporepository in which to check
PackageInterface$packagepackage instance

Definition at line 122 of file ExtensionInstaller.php.

References ExtensionInstaller\installCode().

installCode ( PackageInterface  $package)
protected
Parameters
PackageInterface$package

Definition at line 190 of file ExtensionInstaller.php.

References ExtensionInstaller\getInstallPath().

Referenced by ExtensionInstaller\install(), and ExtensionInstaller\updateCode().

isInstalled ( \Composer\Repository\InstalledRepositoryInterface  $repo,
PackageInterface  $package 
)

Checks that provided package is installed.

Parameters
\Composer\Repository\InstalledRepositoryInterface$reporepository in which to check
PackageInterface$packagepackage instance
Returns
bool

Definition at line 112 of file ExtensionInstaller.php.

References ExtensionInstaller\getInstallPath().

removeCode ( PackageInterface  $package)
protected
Parameters
PackageInterface$package

Definition at line 221 of file ExtensionInstaller.php.

References ExtensionInstaller\getInstallPath().

Referenced by ExtensionInstaller\uninstall(), and ExtensionInstaller\updateCode().

supports (   $packageType)

Decides if the installer supports the given type

Parameters
string$packageType
Returns
bool

Definition at line 98 of file ExtensionInstaller.php.

uninstall ( \Composer\Repository\InstalledRepositoryInterface  $repo,
PackageInterface  $package 
)

Uninstalls specific package.

Parameters
\Composer\Repository\InstalledRepositoryInterface$reporepository in which to check
PackageInterface$packagepackage instance
Exceptions
\InvalidArgumentExceptionif $initial package is not installed

Definition at line 157 of file ExtensionInstaller.php.

References ExtensionInstaller\removeCode().

update ( \Composer\Repository\InstalledRepositoryInterface  $repo,
PackageInterface  $initial,
PackageInterface  $target 
)

Updates specific package.

Parameters
\Composer\Repository\InstalledRepositoryInterface$reporepository in which to check
PackageInterface$initialalready installed package version
PackageInterface$targetupdated version
Exceptions
\InvalidArgumentExceptionif $initial package is not installed

Definition at line 138 of file ExtensionInstaller.php.

References ExtensionInstaller\updateCode().

updateCode ( PackageInterface  $initial,
PackageInterface  $target 
)
protected
Parameters
PackageInterface$initial
PackageInterface$target

Definition at line 198 of file ExtensionInstaller.php.

References ExtensionInstaller\getInstallPath(), ExtensionInstaller\installCode(), and ExtensionInstaller\removeCode().

Referenced by ExtensionInstaller\update().

Member Data Documentation

$composer
protected

Definition at line 47 of file ExtensionInstaller.php.

Referenced by ExtensionInstaller\__construct().

$downloadManager
protected

Definition at line 52 of file ExtensionInstaller.php.

$extensionDir
protected

Definition at line 42 of file ExtensionInstaller.php.

$filesystem
protected

Definition at line 57 of file ExtensionInstaller.php.

Referenced by ExtensionInstaller\__construct().

$pluginConfig
protected

Definition at line 62 of file ExtensionInstaller.php.

const TYPO3_EXT_DIR = 'ext'

Definition at line 37 of file ExtensionInstaller.php.