PHP Класс Cake\Upgrade\Shell\Task\StageTask

Handles staging changes for the upgrade process
Наследование: extends Cake\Console\Shell
Показать файл Открыть проект

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

Свойство Тип Описание
$_files array Files
$_mkdirCommand string mkdir command to use for creating folders/paths.
$_paths array Paths
$_staged array Staged changes for processing at the end

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

Метод Описание
__construct ( ConsoleIo $io = null ) {@inheritDoc}
change ( string $filePath, string $original, string $updated ) : boolean Store a change for a file
clear ( ) : void Clears the change log.
commit ( string $path = null ) : void Write staged changes
delete ( string $path ) : boolean delete
files ( array $excludes = [], boolean $reset = false ) : array Searches the paths and finds files based on extension.
move ( string $from, string $to ) : boolean move
source ( string $path ) : string Get the source of a file, taking into account that there may be incremental diffs

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

Метод Описание
_getPath ( ) : string Get the path to operate on. Uses either the first argument, or the plugin parameter if its set.
_gitMove ( string $gitCd, string $from, string $to ) : void Moves files or folders using GIT.
_makeDir ( string $path ) : void Creates a directory/path.

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

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

{@inheritDoc}
public __construct ( ConsoleIo $io = null )
$io Cake\Console\ConsoleIo

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

Get the path to operate on. Uses either the first argument, or the plugin parameter if its set.
protected _getPath ( ) : string
Результат string

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

Moves files or folders using GIT.
protected _gitMove ( string $gitCd, string $from, string $to ) : void
$gitCd string The `cd` command that changes into the files/folder parent directory
$from string The source path
$to string The target path
Результат void

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

Creates a directory/path.
protected _makeDir ( string $path ) : void
$path string The directory/path to create.
Результат void

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

Store a change for a file
public change ( string $filePath, string $original, string $updated ) : boolean
$filePath string (unused, for future reference)
$original string
$updated string
Результат boolean

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

Clears the change log.
public clear ( ) : void
Результат void

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

If it's a dry run though - only show what will be done, don't do anything
public commit ( string $path = null ) : void
$path string file path
Результат void

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

delete
public delete ( string $path ) : boolean
$path string
Результат boolean

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

Searches the paths and finds files based on extension.
public files ( array $excludes = [], boolean $reset = false ) : array
$excludes array
$reset boolean
Результат array

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

move
public move ( string $from, string $to ) : boolean
$from string
$to string
Результат boolean

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

Get the source of a file, taking into account that there may be incremental diffs
public source ( string $path ) : string
$path string
Результат string

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

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

Files
protected array $_files
Результат array

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

mkdir command to use for creating folders/paths.
protected string $_mkdirCommand
Результат string

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

Paths
protected array $_paths
Результат array

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

Staged changes for processing at the end
protected array $_staged
Результат array