PHP Класс Netresearch\Composer\Patches\Patch

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

__get() публичный Метод

Get a info property
public __get ( string $name ) : string | mixed
$name string
Результат string | mixed

__isset() публичный Метод

Check if a info property is set
public __isset ( string $name ) : string
$name string
Результат string

apply() публичный Метод

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

executeProcess() защищенный Метод

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
Результат integer

getActionFiles() защищенный Метод

Find the file additions/deletions within the patch file
protected getActionFiles ( string $action ) : array
$action string '-' or '+'
Результат array

getChecksum() публичный Метод

public getChecksum ( ) : string
Результат string

getFileAdditions() публичный Метод

Get the files, added by this patch
public getFileAdditions ( ) : type
Результат type

getFileDeletions() публичный Метод

Get the files, deleted (or replaced) by this patch
public getFileDeletions ( ) : array
Результат array

read() защищенный Метод

Read in the patch
protected read ( ) : string
Результат string

revert() публичный Метод

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

runCommand() защищенный Метод

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

whichPatchCmd() защищенный Метод

Locate the patch executable
protected whichPatchCmd ( ) : string
Результат string

Описание свойств

$checksum защищенное свойство

protected $checksum

$content защищенное свойство

The content of the patch file
protected string $content
Результат string

$fileAdditions защищенное свойство

File additions inside the patch
protected array $fileAdditions
Результат array

$fileDeletions защищенное свойство

File deletions/replacements inside the patch
protected array $fileDeletions
Результат array

$info защищенное свойство

Info object created by {@see PatchSet::process()}
protected stdClass $info
Результат stdClass

$patchSet защищенное свойство

protected PatchSet,Netresearch\Composer\Patches $patchSet
Результат Netresearch\Composer\Patches\PatchSet