PHP 클래스 Cake\Upgrade\Shell\Task\StageTask

Handles staging changes for the upgrade process
상속: extends Cake\Console\Shell
파일 보기 프로젝트 열기: cakephp/upgrade

보호된 프로퍼티들

프로퍼티 타입 설명
$_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