PearPackageExtractor
in package
Extractor for pear packages.
Composer cannot rely on tar files structure when place it inside package target dir. Correct source files disposition must be read from package.xml This extract pear package source files to target dir.
Tags
Table of Contents
- $file : mixed
- $filesystem : Filesystem
- $rolesWithoutPackageNamePrefix : mixed
- __construct() : mixed
- extractTo() : mixed
- Installs PEAR source files according to package.xml definitions and removes extracted files
- applyRelease() : mixed
- buildCopyActions() : array<string|int, mixed>
- Builds list of copy and list of remove actions that would transform extracted PEAR tarball into installed package.
- buildSourceList10() : mixed
- buildSourceList20() : mixed
- combine() : mixed
- copyFile() : mixed
- copyFiles() : mixed
- Perform copy actions on files
Properties
$file
private
mixed
$file
$filesystem
private
Filesystem
$filesystem
$rolesWithoutPackageNamePrefix
private
static mixed
$rolesWithoutPackageNamePrefix
= array('php', 'script', 'www')
Methods
__construct()
public
__construct(mixed $file) : mixed
Parameters
- $file : mixed
Return values
mixed —extractTo()
Installs PEAR source files according to package.xml definitions and removes extracted files
public
extractTo(string $target[, array<string|int, mixed> $roles = array('php' => '/', 'script' => '/bin') ][, array<string|int, mixed> $vars = array() ]) : mixed
Parameters
- $target : string
-
target install location. all source installation would be performed relative to target path.
- $roles : array<string|int, mixed> = array('php' => '/', 'script' => '/bin')
-
types of files to install. default role for PEAR source files are 'php'.
- $vars : array<string|int, mixed> = array()
-
used for replacement tasks
Tags
Return values
mixed —applyRelease()
private
applyRelease(mixed &$actions, mixed $releaseNodes, mixed $vars) : mixed
Parameters
- $actions : mixed
- $releaseNodes : mixed
- $vars : mixed
Return values
mixed —buildCopyActions()
Builds list of copy and list of remove actions that would transform extracted PEAR tarball into installed package.
private
buildCopyActions(string $source, array<string|int, mixed> $roles, array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
- $source : string
-
string path to extracted files
- $roles : array<string|int, mixed>
-
array [role => roleRoot] relative root for files having that role
- $vars : array<string|int, mixed>
-
list of values can be used for replacement tasks
Tags
Return values
array<string|int, mixed> —array of 'source' => 'target', where source is location of file in the tarball (relative to source path, and target is destination of file (also relative to $source path)
buildSourceList10()
private
buildSourceList10(mixed $children, mixed $targetRoles, mixed $source, mixed $target, mixed $role, mixed $packageName) : mixed
Parameters
- $children : mixed
- $targetRoles : mixed
- $source : mixed
- $target : mixed
- $role : mixed
- $packageName : mixed
Return values
mixed —buildSourceList20()
private
buildSourceList20(mixed $children, mixed $targetRoles, mixed $source, mixed $target, mixed $role, mixed $packageName) : mixed
Parameters
- $children : mixed
- $targetRoles : mixed
- $source : mixed
- $target : mixed
- $role : mixed
- $packageName : mixed
Return values
mixed —combine()
private
combine(mixed $left, mixed $right) : mixed
Parameters
- $left : mixed
- $right : mixed
Return values
mixed —copyFile()
private
copyFile(mixed $from, mixed $to, mixed $tasks, mixed $vars) : mixed
Parameters
- $from : mixed
- $to : mixed
- $tasks : mixed
- $vars : mixed
Return values
mixed —copyFiles()
Perform copy actions on files
private
copyFiles(array<string|int, mixed> $files, string $source, string $target, array<string|int, mixed> $roles, array<string|int, mixed> $vars) : mixed
Parameters
- $files : array<string|int, mixed>
-
array of copy actions ('from', 'to') with relative paths
- $source : string
-
path to source dir.
- $target : string
-
path to destination dir
- $roles : array<string|int, mixed>
-
array [role => roleRoot] relative root for files having that role
- $vars : array<string|int, mixed>
-
list of values can be used for replacement tasks