Class ProjectTask
Task class for creating new project apps and plugins
- AppShell
- ProjectTask
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/Task/ProjectTask.php
Properties summary
-
$configPath
publicstring
configs path (used in testing).
Method Summary
-
_replaceCorePath() protected
Replaces the CAKE_PATH placeholder in the template files. -
bake() public
Looks for a skeleton template of a Cake application, and if not found asks the user for a path. When there is a path this method will make a deep copy of the skeleton to the project directory.
-
cachePrefix() public
Writes cache prefix using app's name -
cakeAdmin() public
Enables Configure::read('Routing.prefixes') in /app/Config/core.php -
cakeOnIncludePath() public
Checks PHP's include_path for CakePHP. -
consolePath() public
Generates the correct path to the CakePHP libs that are generating the project and points app/console/cake.php to the right place
-
corePath() public
Generates and writes CAKE_CORE_INCLUDE_PATH -
execute() public
Checks that given project path does not already exist, and finds the app directory in it. Then it calls bake() with that information.
-
getOptionParser() public
Gets the option parser instance and configures it. -
getPrefix() public
Checks for Configure::read('Routing.prefixes') and forces user to input it if not enabled -
securityCipherSeed() public
Generates and writes 'Security.cipherSeed' -
securitySalt() public
Generates and writes 'Security.salt'
Method Detail
_replaceCorePath() protected ¶
_replaceCorePath( string $filename , boolean $hardCode )
Replaces the CAKE_PATH placeholder in the template files.
Parameters
- string $filename
- The filename to operate on.
- boolean $hardCode
- Whether or not the define should be uncommented.
Returns
Success
bake() public ¶
bake( string $path , string $skel = null , string $skip = array('empty') )
Looks for a skeleton template of a Cake application, and if not found asks the user for a path. When there is a path this method will make a deep copy of the skeleton to the project directory.
Parameters
- string $path
- Project path
- string $skel optional null
- Path to copy from
- string $skip optional array('empty')
- array of directories to skip when copying
Returns
cachePrefix() public ¶
cachePrefix( string $dir )
Writes cache prefix using app's name
Parameters
- string $dir
- Path to project
Returns
Success
cakeAdmin() public ¶
cakeAdmin( string $name )
Enables Configure::read('Routing.prefixes') in /app/Config/core.php
Parameters
- string $name
- Name to use as admin routing
Returns
Success
cakeOnIncludePath() public ¶
cakeOnIncludePath( )
Checks PHP's include_path for CakePHP.
Returns
Indicates whether or not CakePHP exists on include_path
consolePath() public ¶
consolePath( string $path )
Generates the correct path to the CakePHP libs that are generating the project and points app/console/cake.php to the right place
Parameters
- string $path
- Project path.
Returns
success
corePath() public ¶
corePath( string $path , boolean $hardCode = true )
Generates and writes CAKE_CORE_INCLUDE_PATH
Parameters
- string $path
- Project path
- boolean $hardCode optional true
- Whether or not define calls should be hardcoded.
Returns
Success
execute() public ¶
execute( )
Checks that given project path does not already exist, and finds the app directory in it. Then it calls bake() with that information.
Returns
getPrefix() public ¶
getPrefix( )
Checks for Configure::read('Routing.prefixes') and forces user to input it if not enabled
Returns
Admin route to use
securityCipherSeed() public ¶
securityCipherSeed( string $path )
Generates and writes 'Security.cipherSeed'
Parameters
- string $path
- Project path
Returns
Success
securitySalt() public ¶
securitySalt( string $path )
Generates and writes 'Security.salt'
Parameters
- string $path
- Project path
Returns
Success