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

Public Member Functions

 download (PackageInterface $package, $path)
 
 getLocalChanges (PackageInterface $package, $path)
 
 decodeTerExchangeData ($stream)
 
 constructEmConf (array $extensionData)
 
 extensionMD5array (array $filesArray)
 
 fixEmConf (array $emConf)
 
 stringToDependency ($dependency)
 

Static Public Member Functions

static dependencyToString ($dependency, $type= 'depends')
 

Protected Member Functions

 extract ($file, $path)
 
 getEmConfMetaData ($path)
 
 extractFilesArrayFromExtensionData (array $extensionData)
 
 extractDirectoriesFromExtensionData (array $files)
 
 createDirectoriesForExtensionFiles (array $directories, $rootPath)
 
 createNestedDirectory ($directory)
 
 writeExtensionFiles (array $files, $rootPath)
 
 writeEmConf (array $extensionData, $path)
 
 convertDependencies ($dependencies)
 

Protected Attributes

 $package
 

Detailed Description

TYPO3 CMS Extension Downloader Extracts the TYPO3 CMS T3X Format

Author
Sascha Egerer sasch.nosp@m.a.eg.nosp@m.erer@.nosp@m.dkd..nosp@m.de

Definition at line 37 of file T3xDownloader.php.

Member Function Documentation

constructEmConf ( array  $extensionData)

Generates the content for the ext_emconf.php file

Definition at line 263 of file T3xDownloader.php.

References T3xDownloader\extensionMD5array(), and T3xDownloader\fixEmConf().

Referenced by T3xDownloader\writeEmConf().

convertDependencies (   $dependencies)
protected

Convert dependencies from TER format to EM_CONF format

Parameters
string$dependenciesserialized dependency array
Returns
array

Definition at line 412 of file T3xDownloader.php.

createDirectoriesForExtensionFiles ( array  $directories,
  $rootPath 
)
protected

Loops over an array of directories and creates them in the given root path It also creates nested directory structures

Parameters
array$directories
string$rootPath
Returns
void

Definition at line 191 of file T3xDownloader.php.

References T3xDownloader\createNestedDirectory().

Referenced by T3xDownloader\extract().

createNestedDirectory (   $directory)
protected

Wrapper for utility method to create directory recusively

Exceptions
\RuntimeException
Parameters
string$directoryAbsolute path

Definition at line 203 of file T3xDownloader.php.

Referenced by T3xDownloader\createDirectoriesForExtensionFiles().

decodeTerExchangeData (   $stream)
Parameters
$stream
Returns
array
Exceptions
\RuntimeException

Definition at line 135 of file T3xDownloader.php.

Referenced by T3xDownloader\extract().

static dependencyToString (   $dependency,
  $type = 'depends' 
)
static

Checks whether the passed dependency is TER2-style (array) and returns a single string for displaying the dependencies.

It leaves out all version numbers and the "php" and "typo3" dependencies, as they are implicit and of no interest without the version number.

Parameters
mixed$dependencyEither a string or an array listing dependencies.
string$typeThe dependency type to list if $dep is an array
Returns
string A simple dependency list for display

Definition at line 370 of file T3xDownloader.php.

Referenced by T3xDownloader\fixEmConf().

download ( PackageInterface  $package,
  $path 
)

Definition at line 47 of file T3xDownloader.php.

extensionMD5array ( array  $filesArray)

Creates a MD5-hash array over the current files in the extension

Parameters
array$filesArray
Returns
array MD5-keys

Definition at line 292 of file T3xDownloader.php.

Referenced by T3xDownloader\constructEmConf().

extract (   $file,
  $path 
)
protected
extractDirectoriesFromExtensionData ( array  $files)
protected

Extract needed directories from given extensionDataFilesArray

Parameters
array$files
Returns
array

Definition at line 172 of file T3xDownloader.php.

Referenced by T3xDownloader\extract().

extractFilesArrayFromExtensionData ( array  $extensionData)
protected

Returns the "FILES" part from the data array

Parameters
array$extensionData
Returns
mixed

Definition at line 162 of file T3xDownloader.php.

Referenced by T3xDownloader\extract().

fixEmConf ( array  $emConf)

Fix the em conf - Converts old / ter em_conf format to new format

Parameters
array$emConf
Returns
array

Definition at line 312 of file T3xDownloader.php.

References T3xDownloader\dependencyToString(), elseif, and T3xDownloader\stringToDependency().

Referenced by T3xDownloader\constructEmConf().

getEmConfMetaData (   $path)
protected
Parameters
string$path
Returns
array mixed

Definition at line 116 of file T3xDownloader.php.

References $EM_CONF.

Referenced by T3xDownloader\getLocalChanges(), and T3xDownloader\writeEmConf().

getLocalChanges ( PackageInterface  $package,
  $path 
)

Definition at line 76 of file T3xDownloader.php.

References $EM_CONF, and T3xDownloader\getEmConfMetaData().

stringToDependency (   $dependency)

Checks whether the passed dependency is TER-style (string) or TER2-style (array) and returns a single string for displaying the dependencies.

It leaves out all version numbers and the "php" and "typo3" dependencies, as they are implicit and of no interest without the version number.

Parameters
mixed$dependencyEither a string or an array listing dependencies.
Returns
string A simple dependency list for display

Definition at line 395 of file T3xDownloader.php.

Referenced by T3xDownloader\fixEmConf().

writeEmConf ( array  $extensionData,
  $path 
)
protected
Parameters
array$extensionData
string$pathpath of the extension folder

Definition at line 243 of file T3xDownloader.php.

References T3xDownloader\constructEmConf(), and T3xDownloader\getEmConfMetaData().

Referenced by T3xDownloader\extract().

writeExtensionFiles ( array  $files,
  $rootPath 
)
protected

Loops over an array of files and writes them to the given rootPath

Parameters
array$files
string$rootPath
Returns
void

Definition at line 225 of file T3xDownloader.php.

References $filename.

Referenced by T3xDownloader\extract().

Member Data Documentation

$package
protected

Definition at line 42 of file T3xDownloader.php.