A shell class to help developers upgrade applications to CakePHP 2.0
Replace cakeError with built-in exceptions. NOTE: this ignores calls where you've passed your own secondary parameters to cakeError().
_filesRegexpUpdate( array $patterns )
Updates files based on regular expressions.
$patterns
_findFiles( string $extensions '' )
Searches the paths and finds files based on extension.
$extensions
optional '' _movePhpFiles( string $path , array $options )
Move application php files to where they now should be
Find all php files in the folder (honoring recursive) and determine where CakePHP expects the file to be If the file is not exactly where CakePHP expects it - move it.
$path
$options
_moveViewFiles( )
Move application views files to where they now should be
Find all view files in the folder and determine where cake expects the file to be
_updateFile( string $file , array $patterns )
Update a single file.
$file
$patterns
basics( )
Upgrade the removed basics functions.
components( )
Update components.
controller_redirects( )
Update controller redirects.
exceptions( )
Replace cakeError with built-in exceptions. NOTE: this ignores calls where you've passed your own secondary parameters to cakeError().
getOptionParser( )
Gets the option parser instance and configures it.
ConsoleOptionParser
i18n( )
Update i18n.
locations( )
Move files and folders to their new homes
Moves folders containing files which cannot necessarily be auto-detected (libs and templates) and then looks for all php files except vendors, and moves them to where Cake 2.0 expects to find them.
tests( )
Update tests.
protected array
Map
array( 'Controller' => 'Controller', 'Component' => 'Controller/Component', 'Model' => 'Model', 'Behavior' => 'Model/Behavior', 'Datasource' => 'Model/Datasource', 'Dbo' => 'Model/Datasource/Database', 'View' => 'View', 'Helper' => 'View/Helper', 'Shell' => 'Console/Command', 'Task' => 'Console/Command/Task', 'Case' => 'Test/Case', 'Fixture' => 'Test/Fixture', 'Error' => 'Lib/Error', )
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-UpgradeShell.html