PHP Trait Cake\Upgrade\Shell\Task\ChangeTrait

Show file Open project: cakephp/upgrade

Public Methods

Method Description
main ( ) : void Make tasks callable
process ( string $path ) : void process

Protected Methods

Method Description
_process ( string $path ) : void Default noop
_shouldProcess ( string $path ) : boolean _shouldProcess
_updateContents ( string $contents, array $patterns ) : string Update the contents of a file using an array of find and replace patterns

Method Details

_process() protected method

Default noop
protected _process ( string $path ) : void
$path string
return void

_shouldProcess() protected method

Default to PHP files only
protected _shouldProcess ( string $path ) : boolean
$path string
return boolean

_updateContents() protected method

Update the contents of a file using an array of find and replace patterns
protected _updateContents ( string $contents, array $patterns ) : string
$contents string The file contents to update
$patterns array The replacement patterns to run.
return string

main() public method

Make tasks callable
public main ( ) : void
return void

process() public method

process
public process ( string $path ) : void
$path string
return void