PHP Class Netresearch\Composer\Patches\Patch

Afficher le fichier Open project: netresearch/composer-patches-plugin Class Usage Examples

Protected Properties

Свойство Type Description
$checksum
$content string The content of the patch file
$fileAdditions array File additions inside the patch
$fileDeletions array File deletions/replacements inside the patch
$info stdClass Info object created by {@see PatchSet::process()}
$patchSet Netresearch\Composer\Patches\PatchSet

Méthodes publiques

Méthode Description
__construct ( stdClass $info, Netresearch\Composer\Patches\PatchSet $patchSet ) Construct with $info from {@see PatchSet::process()}
__get ( string $name ) : string | mixed Get a info property
__isset ( string $name ) : string Check if a info property is set
apply ( string $toPath, boolean $dryRun = FALSE ) Apply the patch
getChecksum ( ) : string
getFileAdditions ( ) : type Get the files, added by this patch
getFileDeletions ( ) : array Get the files, deleted (or replaced) by this patch
revert ( string $toPath, boolean $dryRun = FALSE ) Revert the patch

Méthodes protégées

Méthode Description
executeProcess ( string $command, string $cwd, string $stdin, string &$stdout, string &$stderr = NULL ) : integer Process execution wrapper adapted from
getActionFiles ( string $action ) : array Find the file additions/deletions within the patch file
read ( ) : string Read in the patch
runCommand ( string $toPath, boolean $revert = FALSE, boolean $dryRun = FALSE ) Run the patch command
whichPatchCmd ( ) : string Locate the patch executable

Method Details

__construct() public méthode

Construct with $info from {@see PatchSet::process()}
public __construct ( stdClass $info, Netresearch\Composer\Patches\PatchSet $patchSet )
$info stdClass
$patchSet Netresearch\Composer\Patches\PatchSet

__get() public méthode

Get a info property
public __get ( string $name ) : string | mixed
$name string
Résultat string | mixed

__isset() public méthode

Check if a info property is set
public __isset ( string $name ) : string
$name string
Résultat string

apply() public méthode

Apply the patch
public apply ( string $toPath, boolean $dryRun = FALSE )
$toPath string
$dryRun boolean

executeProcess() protected méthode

Process execution wrapper adapted from
protected executeProcess ( string $command, string $cwd, string $stdin, string &$stdout, string &$stderr = NULL ) : integer
$command string
$cwd string
$stdin string
$stdout string
$stderr string
Résultat integer

getActionFiles() protected méthode

Find the file additions/deletions within the patch file
protected getActionFiles ( string $action ) : array
$action string '-' or '+'
Résultat array

getChecksum() public méthode

public getChecksum ( ) : string
Résultat string

getFileAdditions() public méthode

Get the files, added by this patch
public getFileAdditions ( ) : type
Résultat type

getFileDeletions() public méthode

Get the files, deleted (or replaced) by this patch
public getFileDeletions ( ) : array
Résultat array

read() protected méthode

Read in the patch
protected read ( ) : string
Résultat string

revert() public méthode

Revert the patch
public revert ( string $toPath, boolean $dryRun = FALSE )
$toPath string
$dryRun boolean

runCommand() protected méthode

Run the patch command
protected runCommand ( string $toPath, boolean $revert = FALSE, boolean $dryRun = FALSE )
$toPath string
$revert boolean
$dryRun boolean

whichPatchCmd() protected méthode

Locate the patch executable
protected whichPatchCmd ( ) : string
Résultat string

Property Details

$checksum protected_oe property

protected $checksum

$content protected_oe property

The content of the patch file
protected string $content
Résultat string

$fileAdditions protected_oe property

File additions inside the patch
protected array $fileAdditions
Résultat array

$fileDeletions protected_oe property

File deletions/replacements inside the patch
protected array $fileDeletions
Résultat array

$info protected_oe property

Info object created by {@see PatchSet::process()}
protected stdClass $info
Résultat stdClass

$patchSet protected_oe property

protected PatchSet,Netresearch\Composer\Patches $patchSet
Résultat Netresearch\Composer\Patches\PatchSet