PHP Class Cake\Upgrade\Shell\Task\NamespacesTask

Inheritance: extends BaseTask, use trait ChangeTrait
Show file Open project: cakephp/upgrade

Public Properties

Property Type Description
$tasks

Protected Methods

Method Description
_getNamespace ( string $path ) : string _getNamespace
_process ( $path ) : boolean Adds the namespace to a given file.
_shouldProcess ( string $path ) : boolean _shouldProcess

Method Details

_getNamespace() protected method

Derives the root namespace from the path. Use the application root as a basis, and strip off anything before Plugin directory - the plugin directory is a root of sorts.
protected _getNamespace ( string $path ) : string
$path string
return string

_process() protected method

Adds the namespace to a given file.
protected _process ( $path ) : boolean
return boolean

_shouldProcess() protected method

If it already has a namespace - bail, otherwise use the default (php files only)
protected _shouldProcess ( string $path ) : boolean
$path string
return boolean

Property Details

$tasks public property

public $tasks