mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Merge branch '2.0' into 2.0-upgrade
This commit is contained in:
commit
80fdf4d2cf
603 changed files with 14079 additions and 12146 deletions
|
@ -14,8 +14,7 @@
|
||||||
; *
|
; *
|
||||||
; * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
; * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
; * @link http://cakephp.org CakePHP(tm) Project
|
; * @link http://cakephp.org CakePHP(tm) Project
|
||||||
; * @package cake
|
; * @package app.config
|
||||||
; * @subpackage cake.app.config
|
|
||||||
; * @since CakePHP(tm) v 0.10.0.1076
|
; * @since CakePHP(tm) v 0.10.0.1076
|
||||||
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
; */
|
; */
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.10.8.2117
|
* @since CakePHP(tm) v 0.10.8.2117
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,16 +14,14 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* In this file you set up your database connection details.
|
* In this file you set up your database connection details.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.config
|
||||||
* @subpackage cake.config
|
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Database configuration class.
|
* Database configuration class.
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
#
|
#
|
||||||
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
# @link http://cakephp.org CakePHP(tm) Project
|
# @link http://cakephp.org CakePHP(tm) Project
|
||||||
# @package cake
|
# @package app.console
|
||||||
# @subpackage cake.app.console
|
|
||||||
# @since CakePHP(tm) v 2.0
|
# @since CakePHP(tm) v 2.0
|
||||||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
#
|
#
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
:: Redistributions of files must retain the above copyright notice.
|
:: Redistributions of files must retain the above copyright notice.
|
||||||
::
|
::
|
||||||
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
:: @link http://cakephp.org CakePHP(tm) Project
|
:: @link http://cakephp.org CakePHP(tm) Project
|
||||||
:: @package cake
|
:: @package app.console
|
||||||
:: @subpackage cake.app.console
|
|
||||||
:: @since CakePHP(tm) v 2.0
|
:: @since CakePHP(tm) v 2.0
|
||||||
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
::
|
::
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.console
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
* @since CakePHP(tm) v 0.10.0.1076
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.webroot
|
||||||
* @subpackage cake.app.webroot
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,9 +24,7 @@ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||||
/**
|
/**
|
||||||
* Ensure required classes are available.
|
* Ensure required classes are available.
|
||||||
*/
|
*/
|
||||||
if (!class_exists('File')) {
|
App::import('Core', 'File');
|
||||||
uses('file');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make clean CSS
|
* Make clean CSS
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.webroot.css
|
||||||
* @subpackage cake.app.webroot.css
|
|
||||||
* @since CakePHP(tm)
|
* @since CakePHP(tm)
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.webroot
|
||||||
* @subpackage cake.app.webroot
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://book.cakephp.org/view/1196/Testing
|
* @link http://book.cakephp.org/view/1196/Testing
|
||||||
* @package cake
|
* @package app.webroot
|
||||||
* @subpackage cake.app.webroot
|
|
||||||
* @since CakePHP(tm) v 1.2.0.4433
|
* @since CakePHP(tm) v 1.2.0.4433
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
//
|
//
|
||||||
// @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
// @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
// @link http://cakephp.org
|
// @link http://cakephp.org
|
||||||
// @package cake
|
// @package cake.libs
|
||||||
// @subpackage cake.cake.libs
|
|
||||||
// @since CakePHP(tm) v 0.2.9
|
// @since CakePHP(tm) v 0.2.9
|
||||||
// @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
// @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
// +--------------------------------------------------------------------------------------------+ //
|
// +--------------------------------------------------------------------------------------------+ //
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
1.3.6
|
2.0.0-dev
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -61,36 +60,18 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Loads component/components from LIBS. Takes optional number of parameters.
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
*
|
|
||||||
* `uses('flay', 'time');`
|
|
||||||
*
|
|
||||||
* @param string $name Filename without the .php part
|
|
||||||
* @deprecated Will be removed in 2.0
|
|
||||||
* @link http://book.cakephp.org/view/1140/uses
|
|
||||||
*/
|
|
||||||
function uses() {
|
|
||||||
$args = func_get_args();
|
|
||||||
foreach ($args as $file) {
|
|
||||||
require_once(LIBS . strtolower($file) . '.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints out debug information about given variable.
|
* Prints out debug information about given variable.
|
||||||
*
|
*
|
||||||
* Only runs if debug level is greater than zero.
|
* Only runs if debug level is greater than zero.
|
||||||
*
|
*
|
||||||
* @param boolean $var Variable to show debug information for.
|
* @param boolean $var Variable to show debug information for.
|
||||||
* @param boolean $showHtml If set to true, the method prints the debug data in a screen-friendly way.
|
* @param boolean $showHtml If set to true, the method prints the debug data in a browser-friendly way.
|
||||||
* @param boolean $showFrom If set to true, the method prints from where the function was called.
|
* @param boolean $showFrom If set to true, the method prints from where the function was called.
|
||||||
* @link http://book.cakephp.org/view/1190/Basic-Debugging
|
* @link http://book.cakephp.org/view/1190/Basic-Debugging
|
||||||
* @link http://book.cakephp.org/view/1128/debug
|
* @link http://book.cakephp.org/view/1128/debug
|
||||||
*/
|
*/
|
||||||
function debug($var = false, $showHtml = false, $showFrom = true) {
|
function debug($var = false, $showHtml = null, $showFrom = true) {
|
||||||
if (Configure::read('debug') > 0) {
|
if (Configure::read('debug') > 0) {
|
||||||
$file = '';
|
$file = '';
|
||||||
$line = '';
|
$line = '';
|
||||||
|
@ -117,9 +98,12 @@ TEXT;
|
||||||
if (php_sapi_name() == 'cli') {
|
if (php_sapi_name() == 'cli') {
|
||||||
$template = $text;
|
$template = $text;
|
||||||
}
|
}
|
||||||
|
if ($showHtml === null) {
|
||||||
|
$showHtml = true;
|
||||||
|
}
|
||||||
$var = print_r($var, true);
|
$var = print_r($var, true);
|
||||||
if ($showHtml) {
|
if ($showHtml) {
|
||||||
$var = str_replace('<', '<', str_replace('>', '>', $var));
|
$var = str_replace(array('<', '>'), array('<', '>'), $var);
|
||||||
}
|
}
|
||||||
printf($template, $file, $line, $var);
|
printf($template, $file, $line, $var);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 1.1.11.4062
|
* @since CakePHP(tm) v 1.1.11.4062
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
return $config['Cake.version'] = '1.3.6';
|
return $config['Cake.version'] = '2.0.0-dev';
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config
|
||||||
* @subpackage cake.cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.6833
|
* @since CakePHP(tm) v 1.2.0.6833
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.config.unicode.casefolding
|
||||||
* @subpackage cake.cake.config.unicode.casefolding
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5691
|
* @since CakePHP(tm) v 1.2.0.5691
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
#
|
#
|
||||||
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
# @link http://cakephp.org CakePHP(tm) Project
|
# @link http://cakephp.org CakePHP(tm) Project
|
||||||
# @package cake
|
# @package cake.console
|
||||||
# @subpackage cake.cake.console
|
# @since CakePHP(tm) v 1.2.0.5012
|
||||||
# @since CakePHP(tm) v 1.2.0.5012
|
|
||||||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
|
@ -10,9 +10,8 @@
|
||||||
:: Redistributions of files must retain the above copyright notice.
|
:: Redistributions of files must retain the above copyright notice.
|
||||||
::
|
::
|
||||||
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
:: @link http://cakephp.org CakePHP(tm) Project
|
:: @link http://cakephp.org CakePHP(tm) Project
|
||||||
:: @package cake
|
:: @package cake.console
|
||||||
:: @subpackage cake.cake.console
|
|
||||||
:: @since CakePHP(tm) v 1.2.0.5012
|
:: @since CakePHP(tm) v 1.2.0.5012
|
||||||
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
::
|
::
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -24,8 +23,7 @@ require_once 'console_output.php';
|
||||||
* Error Handler for Cake console. Does simple printing of the
|
* Error Handler for Cake console. Does simple printing of the
|
||||||
* exception that occurred and the stack trace of the error.
|
* exception that occurred and the stack trace of the error.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
*/
|
*/
|
||||||
class ConsoleErrorHandler extends ErrorHandler {
|
class ConsoleErrorHandler extends ErrorHandler {
|
||||||
|
|
||||||
|
@ -51,11 +49,12 @@ class ConsoleErrorHandler extends ErrorHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a exception in the console environment.
|
* Handle a exception in the console environment. Prints a message to stderr.
|
||||||
*
|
*
|
||||||
|
* @param Exception $exception The exception to handle
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function handleException($exception) {
|
public static function handleException(Exception $exception) {
|
||||||
$stderr = self::getStderr();
|
$stderr = self::getStderr();
|
||||||
$stderr->write(sprintf(
|
$stderr->write(sprintf(
|
||||||
__("<error>Error:</error> %s\n%s"),
|
__("<error>Error:</error> %s\n%s"),
|
||||||
|
@ -67,6 +66,11 @@ class ConsoleErrorHandler extends ErrorHandler {
|
||||||
/**
|
/**
|
||||||
* Handle errors in the console environment.
|
* Handle errors in the console environment.
|
||||||
*
|
*
|
||||||
|
* @param int $code Error code
|
||||||
|
* @param string $description Description of the error.
|
||||||
|
* @param string $file The file the error occurred in.
|
||||||
|
* @param int $line The line the error ocurrred on.
|
||||||
|
* @param array $context The backtrace of the error.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function handleError($code, $description, $file = null, $line = null, $context = null) {
|
public static function handleError($code, $description, $file = null, $line = null, $context = null) {
|
||||||
|
@ -84,17 +88,4 @@ class ConsoleErrorHandler extends ErrorHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* undocumented function
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function render() {
|
|
||||||
$this->stderr->write(sprintf(
|
|
||||||
__("<error>Error:</error> %s\n%s"),
|
|
||||||
$this->error->getMessage(),
|
|
||||||
$this->error->getTraceAsString()
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,15 +12,14 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Object wrapper for interacting with stdin
|
* Object wrapper for interacting with stdin
|
||||||
*
|
*
|
||||||
* @package cake.console
|
* @package cake.console.libs
|
||||||
*/
|
*/
|
||||||
class ConsoleInput {
|
class ConsoleInput {
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +32,7 @@ class ConsoleInput {
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @return void
|
* @param string $handle The location of the stream to use as input.
|
||||||
*/
|
*/
|
||||||
public function __construct($handle = 'php://stdin') {
|
public function __construct($handle = 'php://stdin') {
|
||||||
$this->_input = fopen($handle, 'r');
|
$this->_input = fopen($handle, 'r');
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -22,11 +21,36 @@
|
||||||
* ConsoleOptionParser creates these when you use addArgument()
|
* ConsoleOptionParser creates these when you use addArgument()
|
||||||
*
|
*
|
||||||
* @see ConsoleOptionParser::addArgument()
|
* @see ConsoleOptionParser::addArgument()
|
||||||
* @package cake.console
|
* @package cake.console.libs
|
||||||
*/
|
*/
|
||||||
class ConsoleInputArgument {
|
class ConsoleInputArgument {
|
||||||
|
/**
|
||||||
|
* Name of the argument.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_name;
|
||||||
|
|
||||||
protected $_name, $_help, $_required, $_choices;
|
/**
|
||||||
|
* Help string
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_help;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is this option required?
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $_required;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of valid choices for this argument.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $_choices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a new Input Argument
|
* Make a new Input Argument
|
||||||
|
@ -34,8 +58,7 @@ class ConsoleInputArgument {
|
||||||
* @param mixed $name The long name of the option, or an array with all the properites.
|
* @param mixed $name The long name of the option, or an array with all the properites.
|
||||||
* @param string $help The help text for this option
|
* @param string $help The help text for this option
|
||||||
* @param boolean $required Whether this argument is required. Missing required args will trigger exceptions
|
* @param boolean $required Whether this argument is required. Missing required args will trigger exceptions
|
||||||
* @param arraty $choices Valid choices for this option.
|
* @param array $choices Valid choices for this option.
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $help = '', $required = false, $choices = array()) {
|
public function __construct($name, $help = '', $required = false, $choices = array()) {
|
||||||
if (is_array($name) && isset($name['name'])) {
|
if (is_array($name) && isset($name['name'])) {
|
||||||
|
@ -60,7 +83,7 @@ class ConsoleInputArgument {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the help for this this argument.
|
* Generate the help for this argument.
|
||||||
*
|
*
|
||||||
* @param int $width The width to make the name of the option.
|
* @param int $width The width to make the name of the option.
|
||||||
* @return string
|
* @return string
|
||||||
|
@ -116,7 +139,7 @@ class ConsoleInputArgument {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!in_array($value, $this->_choices)) {
|
if (!in_array($value, $this->_choices)) {
|
||||||
throw new InvalidArgumentException(sprintf(
|
throw new ConsoleException(sprintf(
|
||||||
__('"%s" is not a valid value for %s. Please use one of "%s"'),
|
__('"%s" is not a valid value for %s. Please use one of "%s"'),
|
||||||
$value, $this->_name, implode(', ', $this->_choices)
|
$value, $this->_name, implode(', ', $this->_choices)
|
||||||
));
|
));
|
||||||
|
@ -125,7 +148,7 @@ class ConsoleInputArgument {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append this argument to the passed in SimpleXml object.
|
* Append this arguments XML representation to the passed in SimpleXml object.
|
||||||
*
|
*
|
||||||
* @param SimpleXmlElement The parent element.
|
* @param SimpleXmlElement The parent element.
|
||||||
* @return SimpleXmlElement The parent with this argument appended.
|
* @return SimpleXmlElement The parent with this argument appended.
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,11 +22,50 @@
|
||||||
* ConsoleOptionParser creates these when you use addOption()
|
* ConsoleOptionParser creates these when you use addOption()
|
||||||
*
|
*
|
||||||
* @see ConsoleOptionParser::addOption()
|
* @see ConsoleOptionParser::addOption()
|
||||||
* @package cake.console
|
* @package cake.console.libs
|
||||||
*/
|
*/
|
||||||
class ConsoleInputOption {
|
class ConsoleInputOption {
|
||||||
|
/**
|
||||||
|
* Name of the option
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_name;
|
||||||
|
|
||||||
protected $_name, $_short, $_help, $_boolean, $_default, $_choices;
|
/**
|
||||||
|
* Short (1 character) alias for the option.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_short;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Help text for the option.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_help;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the option a boolean option. Boolean options do not consume a parameter.
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
protected $_boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default value for the option
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $_default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An array of choices for the option.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $_choices;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a new Input Option
|
* Make a new Input Option
|
||||||
|
@ -37,8 +75,7 @@ class ConsoleInputOption {
|
||||||
* @param string $help The help text for this option
|
* @param string $help The help text for this option
|
||||||
* @param boolean $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens
|
* @param boolean $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens
|
||||||
* @param string $default The default value for this option.
|
* @param string $default The default value for this option.
|
||||||
* @param arraty $choices Valid choices for this option.
|
* @param array $choices Valid choices for this option.
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $short = null, $help = '', $boolean = false, $default = '', $choices = array()) {
|
public function __construct($name, $short = null, $help = '', $boolean = false, $default = '', $choices = array()) {
|
||||||
if (is_array($name) && isset($name['name'])) {
|
if (is_array($name) && isset($name['name'])) {
|
||||||
|
@ -117,7 +154,7 @@ class ConsoleInputOption {
|
||||||
/**
|
/**
|
||||||
* Get the default value for this option
|
* Get the default value for this option
|
||||||
*
|
*
|
||||||
* @return void
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function defaultValue() {
|
public function defaultValue() {
|
||||||
return $this->_default;
|
return $this->_default;
|
||||||
|
@ -142,7 +179,7 @@ class ConsoleInputOption {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!in_array($value, $this->_choices)) {
|
if (!in_array($value, $this->_choices)) {
|
||||||
throw new InvalidArgumentException(sprintf(
|
throw new ConsoleException(sprintf(
|
||||||
__('"%s" is not a valid value for --%s. Please use one of "%s"'),
|
__('"%s" is not a valid value for --%s. Please use one of "%s"'),
|
||||||
$value, $this->_name, implode(', ', $this->_choices)
|
$value, $this->_name, implode(', ', $this->_choices)
|
||||||
));
|
));
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,19 +22,38 @@
|
||||||
* ConsoleOptionParser creates these when you use addSubcommand()
|
* ConsoleOptionParser creates these when you use addSubcommand()
|
||||||
*
|
*
|
||||||
* @see ConsoleOptionParser::addSubcommand()
|
* @see ConsoleOptionParser::addSubcommand()
|
||||||
* @package cake.console
|
* @package cake.console.libs
|
||||||
*/
|
*/
|
||||||
class ConsoleInputSubcommand {
|
class ConsoleInputSubcommand {
|
||||||
|
|
||||||
protected $_name, $_help, $_parser;
|
/**
|
||||||
|
* Name of the subcommand
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Help string for the subcommand
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_help;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ConsoleOptionParser for this subcommand.
|
||||||
|
*
|
||||||
|
* @var ConsoleOptionParser
|
||||||
|
*/
|
||||||
|
protected $_parser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a new Subcommand
|
* Make a new Subcommand
|
||||||
*
|
*
|
||||||
* @param mixed $name The long name of the subcommand, or an array with all the properites.
|
* @param mixed $name The long name of the subcommand, or an array with all the properites.
|
||||||
* @param string $help The help text for this option
|
* @param string $help The help text for this option
|
||||||
* @param ConsoleOptionParser $parser A parser for this subcommand.
|
* @param mixed $parser A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be
|
||||||
* @return void
|
* used with ConsoleOptionParser::buildFromArray()
|
||||||
*/
|
*/
|
||||||
public function __construct($name, $help = '', $parser = null) {
|
public function __construct($name, $help = '', $parser = null) {
|
||||||
if (is_array($name) && isset($name['name'])) {
|
if (is_array($name) && isset($name['name'])) {
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +26,7 @@ require_once CONSOLE_LIBS . 'help_formatter.php';
|
||||||
* for GetOpt compatible option definition. Provides a builder pattern implementation
|
* for GetOpt compatible option definition. Provides a builder pattern implementation
|
||||||
* for creating shell option parsers.
|
* for creating shell option parsers.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
*/
|
*/
|
||||||
class ConsoleOptionParser {
|
class ConsoleOptionParser {
|
||||||
|
|
||||||
|
@ -88,7 +86,7 @@ class ConsoleOptionParser {
|
||||||
* preceeded by one - and are only one character long. They usually match with a long option,
|
* preceeded by one - and are only one character long. They usually match with a long option,
|
||||||
* and provide a more terse alternative.
|
* and provide a more terse alternative.
|
||||||
*
|
*
|
||||||
* #### Using Options
|
* ### Using Options
|
||||||
*
|
*
|
||||||
* Options can be defined with both long and short forms. By using `$parser->addOption()`
|
* Options can be defined with both long and short forms. By using `$parser->addOption()`
|
||||||
* you can define new options. The name of the option is used as its long form, and you
|
* you can define new options. The name of the option is used as its long form, and you
|
||||||
|
@ -195,7 +193,7 @@ class ConsoleOptionParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or set the command name for shell/task
|
* Get or set the command name for shell/task.
|
||||||
*
|
*
|
||||||
* @param string $text The text to set, or null if you want to read
|
* @param string $text The text to set, or null if you want to read
|
||||||
* @return mixed If reading, the value of the command. If setting $this will be returned
|
* @return mixed If reading, the value of the command. If setting $this will be returned
|
||||||
|
@ -209,7 +207,7 @@ class ConsoleOptionParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or set the description text for shell/task
|
* Get or set the description text for shell/task.
|
||||||
*
|
*
|
||||||
* @param mixed $text The text to set, or null if you want to read. . If an array the text will be imploded with "\n"
|
* @param mixed $text The text to set, or null if you want to read. . If an array the text will be imploded with "\n"
|
||||||
* @return mixed If reading, the value of the description. If setting $this will be returned
|
* @return mixed If reading, the value of the description. If setting $this will be returned
|
||||||
|
@ -247,7 +245,7 @@ class ConsoleOptionParser {
|
||||||
* Add an option to the option parser. Options allow you to define optional or required
|
* Add an option to the option parser. Options allow you to define optional or required
|
||||||
* parameters for your console application. Options are defined by the parameters they use.
|
* parameters for your console application. Options are defined by the parameters they use.
|
||||||
*
|
*
|
||||||
* ### Params
|
* ### Options
|
||||||
*
|
*
|
||||||
* - `short` - The single letter variant for this option, leave undefined for none.
|
* - `short` - The single letter variant for this option, leave undefined for none.
|
||||||
* - `help` - Help text for this option. Used when generating help for the option.
|
* - `help` - Help text for this option. Used when generating help for the option.
|
||||||
|
@ -260,11 +258,12 @@ class ConsoleOptionParser {
|
||||||
* - `choices` A list of valid choices for this option. If left empty all values are valid..
|
* - `choices` A list of valid choices for this option. If left empty all values are valid..
|
||||||
* An exception will be raised when parse() encounters an invalid value.
|
* An exception will be raised when parse() encounters an invalid value.
|
||||||
*
|
*
|
||||||
* @param string $name The long name you want to the value to be parsed out as when options are parsed.
|
* @param mixed $name The long name you want to the value to be parsed out as when options are parsed.
|
||||||
|
* Will also accept an instance of ConsoleInputOption
|
||||||
* @param array $params An array of parameters that define the behavior of the option
|
* @param array $params An array of parameters that define the behavior of the option
|
||||||
* @return returns $this.
|
* @return returns $this.
|
||||||
*/
|
*/
|
||||||
public function addOption($name, $params = array()) {
|
public function addOption($name, $options = array()) {
|
||||||
if (is_object($name) && $name instanceof ConsoleInputOption) {
|
if (is_object($name) && $name instanceof ConsoleInputOption) {
|
||||||
$option = $name;
|
$option = $name;
|
||||||
$name = $option->name();
|
$name = $option->name();
|
||||||
|
@ -277,7 +276,7 @@ class ConsoleOptionParser {
|
||||||
'boolean' => false,
|
'boolean' => false,
|
||||||
'choices' => array()
|
'choices' => array()
|
||||||
);
|
);
|
||||||
$options = array_merge($defaults, $params);
|
$options = array_merge($defaults, $options);
|
||||||
$option = new ConsoleInputOption($options);
|
$option = new ConsoleInputOption($options);
|
||||||
}
|
}
|
||||||
$this->_options[$name] = $option;
|
$this->_options[$name] = $option;
|
||||||
|
@ -300,7 +299,7 @@ class ConsoleOptionParser {
|
||||||
* - `choices` A list of valid choices for this argument. If left empty all values are valid..
|
* - `choices` A list of valid choices for this argument. If left empty all values are valid..
|
||||||
* An exception will be raised when parse() encounters an invalid value.
|
* An exception will be raised when parse() encounters an invalid value.
|
||||||
*
|
*
|
||||||
* @param string $name The name of the argument.
|
* @param mixed $name The name of the argument. Will also accept an instance of ConsoleInputArgument
|
||||||
* @param array $params Parameters for the argument, see above.
|
* @param array $params Parameters for the argument, see above.
|
||||||
* @return $this.
|
* @return $this.
|
||||||
*/
|
*/
|
||||||
|
@ -357,21 +356,20 @@ class ConsoleOptionParser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a subcommand to the subcommand list.
|
* Append a subcommand to the subcommand list.
|
||||||
* Subcommands are usually methods on your Shell, but can also be used to document
|
* Subcommands are usually methods on your Shell, but can also be used to document Tasks.
|
||||||
* Tasks
|
|
||||||
*
|
*
|
||||||
* ### Params
|
* ### Options
|
||||||
*
|
*
|
||||||
* - `help` - Help text for the subcommand.
|
* - `help` - Help text for the subcommand.
|
||||||
* - `parser` - A ConsoleOptionParser for the subcommand. This allows you to create method
|
* - `parser` - A ConsoleOptionParser for the subcommand. This allows you to create method
|
||||||
* specific option parsers. When help is generated for a subcommand, if a parser is present
|
* specific option parsers. When help is generated for a subcommand, if a parser is present
|
||||||
* it will be used.
|
* it will be used.
|
||||||
*
|
*
|
||||||
* @param string $name Name of the subcommand
|
* @param mixed $name Name of the subcommand. Will also accept an instance of ConsoleInputSubcommand
|
||||||
* @param array $params Array of params, see above.
|
* @param array $params Array of params, see above.
|
||||||
* @return $this.
|
* @return $this.
|
||||||
*/
|
*/
|
||||||
public function addSubcommand($name, $params = array()) {
|
public function addSubcommand($name, $options = array()) {
|
||||||
if (is_object($name) && $name instanceof ConsoleInputSubcommand) {
|
if (is_object($name) && $name instanceof ConsoleInputSubcommand) {
|
||||||
$command = $name;
|
$command = $name;
|
||||||
$name = $command->name();
|
$name = $command->name();
|
||||||
|
@ -381,7 +379,7 @@ class ConsoleOptionParser {
|
||||||
'help' => '',
|
'help' => '',
|
||||||
'parser' => null
|
'parser' => null
|
||||||
);
|
);
|
||||||
$options = array_merge($defaults, $params);
|
$options = array_merge($defaults, $options);
|
||||||
$command = new ConsoleInputSubcommand($options);
|
$command = new ConsoleInputSubcommand($options);
|
||||||
}
|
}
|
||||||
$this->_subcommands[$name] = $command;
|
$this->_subcommands[$name] = $command;
|
||||||
|
@ -457,7 +455,7 @@ class ConsoleOptionParser {
|
||||||
}
|
}
|
||||||
foreach ($this->_args as $i => $arg) {
|
foreach ($this->_args as $i => $arg) {
|
||||||
if ($arg->isRequired() && !isset($args[$i]) && empty($params['help'])) {
|
if ($arg->isRequired() && !isset($args[$i]) && empty($params['help'])) {
|
||||||
throw new RuntimeException(
|
throw new ConsoleException(
|
||||||
__('Missing required arguments. %s is required.', $arg->name())
|
__('Missing required arguments. %s is required.', $arg->name())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -552,7 +550,7 @@ class ConsoleOptionParser {
|
||||||
*/
|
*/
|
||||||
protected function _parseOption($name, $params) {
|
protected function _parseOption($name, $params) {
|
||||||
if (!isset($this->_options[$name])) {
|
if (!isset($this->_options[$name])) {
|
||||||
throw new InvalidArgumentException(__('Unknown option `%s`', $name));
|
throw new ConsoleException(__('Unknown option `%s`', $name));
|
||||||
}
|
}
|
||||||
$option = $this->_options[$name];
|
$option = $this->_options[$name];
|
||||||
$isBoolean = $option->isBoolean();
|
$isBoolean = $option->isBoolean();
|
||||||
|
@ -586,7 +584,7 @@ class ConsoleOptionParser {
|
||||||
}
|
}
|
||||||
$next = count($args);
|
$next = count($args);
|
||||||
if (!isset($this->_args[$next])) {
|
if (!isset($this->_args[$next])) {
|
||||||
throw new InvalidArgumentException(__('Too many arguments.'));
|
throw new ConsoleException(__('Too many arguments.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_args[$next]->validChoice($argument)) {
|
if ($this->_args[$next]->validChoice($argument)) {
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* Object wrapper for outputing information from a shell application.
|
* Object wrapper for outputing information from a shell application.
|
||||||
* Can be connected to any stream resource that can be used with fopen()
|
* Can be connected to any stream resource that can be used with fopen()
|
||||||
*
|
*
|
||||||
* Can generate colourzied output on consoles that support it. There are a few
|
* Can generate colourized output on consoles that support it. There are a few
|
||||||
* built in styles
|
* built in styles
|
||||||
*
|
*
|
||||||
* - `error` Error messages.
|
* - `error` Error messages.
|
||||||
|
@ -42,7 +41,7 @@
|
||||||
* See ConsoleOutput::styles() to learn more about defining your own styles. Nested styles are not supported
|
* See ConsoleOutput::styles() to learn more about defining your own styles. Nested styles are not supported
|
||||||
* at this time.
|
* at this time.
|
||||||
*
|
*
|
||||||
* @package cake.console
|
* @package cake.console.libs
|
||||||
*/
|
*/
|
||||||
class ConsoleOutput {
|
class ConsoleOutput {
|
||||||
/**
|
/**
|
||||||
|
@ -143,8 +142,8 @@ class ConsoleOutput {
|
||||||
*
|
*
|
||||||
* Checks for a pretty console enviornment. Ansicon allows pretty consoles
|
* Checks for a pretty console enviornment. Ansicon allows pretty consoles
|
||||||
* on windows, and is supported.
|
* on windows, and is supported.
|
||||||
*
|
*
|
||||||
* @return void
|
* @param string $stream The identifier of the stream to write output to.
|
||||||
*/
|
*/
|
||||||
public function __construct($stream = 'php://stdout') {
|
public function __construct($stream = 'php://stdout') {
|
||||||
$this->_output = fopen($stream, 'w');
|
$this->_output = fopen($stream, 'w');
|
||||||
|
@ -156,7 +155,7 @@ class ConsoleOutput {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs a single or multiple messages to stdout. If no parameters
|
* Outputs a single or multiple messages to stdout. If no parameters
|
||||||
* are passed outputs just a newline.
|
* are passed, outputs just a newline.
|
||||||
*
|
*
|
||||||
* @param mixed $message A string or a an array of strings to output
|
* @param mixed $message A string or a an array of strings to output
|
||||||
* @param integer $newlines Number of newlines to append
|
* @param integer $newlines Number of newlines to append
|
||||||
|
@ -216,7 +215,7 @@ class ConsoleOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a message to the output stream
|
* Writes a message to the output stream.
|
||||||
*
|
*
|
||||||
* @param string $message Message to write.
|
* @param string $message Message to write.
|
||||||
* @return boolean success
|
* @return boolean success
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
App::import('Core', 'String', false);
|
App::import('Core', 'String', false);
|
||||||
|
@ -28,12 +25,14 @@ App::import('Core', 'String', false);
|
||||||
*
|
*
|
||||||
* Xml output is useful for intergration with other tools like IDE's or other build tools.
|
* Xml output is useful for intergration with other tools like IDE's or other build tools.
|
||||||
*
|
*
|
||||||
|
* @package cake.console.libs
|
||||||
|
* @since CakePHP(tm) v 2.0
|
||||||
*/
|
*/
|
||||||
class HelpFormatter {
|
class HelpFormatter {
|
||||||
/**
|
/**
|
||||||
* Build the help formatter for a an OptionParser
|
* Build the help formatter for a an OptionParser
|
||||||
*
|
*
|
||||||
* @return void
|
* @param ConsoleOptionParser $parser The option parser help is being generated for.
|
||||||
*/
|
*/
|
||||||
public function __construct(ConsoleOptionParser $parser) {
|
public function __construct(ConsoleOptionParser $parser) {
|
||||||
$this->_parser = $parser;
|
$this->_parser = $parser;
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Shell dispatcher handles dispatching cli commands.
|
* Shell dispatcher handles dispatching cli commands.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console
|
||||||
* @subpackage cake.cake.console
|
|
||||||
*/
|
*/
|
||||||
class ShellDispatcher {
|
class ShellDispatcher {
|
||||||
|
|
||||||
|
@ -102,7 +100,7 @@ class ShellDispatcher {
|
||||||
protected function _initEnvironment() {
|
protected function _initEnvironment() {
|
||||||
if (!$this->__bootstrap()) {
|
if (!$this->__bootstrap()) {
|
||||||
$message = "Unable to load CakePHP core.\nMake sure " . DS . 'cake' . DS . 'libs exists in ' . CAKE_CORE_INCLUDE_PATH;
|
$message = "Unable to load CakePHP core.\nMake sure " . DS . 'cake' . DS . 'libs exists in ' . CAKE_CORE_INCLUDE_PATH;
|
||||||
throw new RuntimeException($message);
|
throw new CakeException($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->args[0]) || !isset($this->params['working'])) {
|
if (!isset($this->args[0]) || !isset($this->params['working'])) {
|
||||||
|
@ -110,7 +108,7 @@ class ShellDispatcher {
|
||||||
"Please make sure that " . DIRECTORY_SEPARATOR . "cake" . DIRECTORY_SEPARATOR . "console is in your system path,\n" .
|
"Please make sure that " . DIRECTORY_SEPARATOR . "cake" . DIRECTORY_SEPARATOR . "console is in your system path,\n" .
|
||||||
"and check the cookbook for the correct usage of this command.\n" .
|
"and check the cookbook for the correct usage of this command.\n" .
|
||||||
"(http://book.cakephp.org/)";
|
"(http://book.cakephp.org/)";
|
||||||
throw new RuntimeException($message);
|
throw new CakeException($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->shiftArgs();
|
$this->shiftArgs();
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -24,8 +23,7 @@ App::import('Model', 'DbAcl');
|
||||||
* Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode
|
* Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode
|
||||||
* being enabled. Be sure to turn it off when using this shell.
|
* being enabled. Be sure to turn it off when using this shell.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class AclShell extends Shell {
|
class AclShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -24,8 +23,7 @@ App::import('Core', 'File');
|
||||||
/**
|
/**
|
||||||
* API shell to show method signatures of CakePHP core classes.
|
* API shell to show method signatures of CakePHP core classes.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class ApiShell extends Shell {
|
class ApiShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.console.shells
|
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +24,7 @@
|
||||||
* Add your application-wide methods in the class below, your shells
|
* Add your application-wide methods in the class below, your shells
|
||||||
* will inherit them.
|
* will inherit them.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class AppShell extends Shell {
|
class AppShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +24,7 @@
|
||||||
/**
|
/**
|
||||||
* Bake is a command-line code generation utility for automating programmer chores.
|
* Bake is a command-line code generation utility for automating programmer chores.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.libs
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @link http://book.cakephp.org/view/1522/Code-Generation-with-Bake
|
* @link http://book.cakephp.org/view/1522/Code-Generation-with-Bake
|
||||||
*/
|
*/
|
||||||
class BakeShell extends Shell {
|
class BakeShell extends Shell {
|
||||||
|
@ -186,7 +184,7 @@ class BakeShell extends Shell {
|
||||||
} else {
|
} else {
|
||||||
$this->error(__('Bake All could not continue without a valid model'));
|
$this->error(__('Bake All could not continue without a valid model'));
|
||||||
}
|
}
|
||||||
$this->_stop();
|
return $this->_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2006-2010, Cake Software Foundation, Inc.
|
* @copyright Copyright 2006-2010, Cake Software Foundation, Inc.
|
||||||
* @link http://cakephp.org CakePHP Project
|
* @link http://cakephp.org CakePHP Project
|
||||||
* @package cake
|
|
||||||
* @subpackage cake.tests.cases.console.libs
|
|
||||||
* @since CakePHP v 2.0
|
* @since CakePHP v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +19,7 @@
|
||||||
/**
|
/**
|
||||||
* Shows a list of commands available from the console.
|
* Shows a list of commands available from the console.
|
||||||
*
|
*
|
||||||
* @package cake.console.libs
|
* @package cake.console.shells
|
||||||
*/
|
*/
|
||||||
class CommandListShell extends Shell {
|
class CommandListShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,13 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class ConsoleShell extends Shell {
|
class ConsoleShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5669
|
* @since CakePHP(tm) v 1.2.0.5669
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Shell for I18N management.
|
* Shell for I18N management.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class I18nShell extends Shell {
|
class I18nShell extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5550
|
* @since CakePHP(tm) v 1.2.0.5550
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -26,8 +25,7 @@ App::import('Model', 'CakeSchema', false);
|
||||||
/**
|
/**
|
||||||
* Schema is a command-line database management utility for automating programmer chores.
|
* Schema is a command-line database management utility for automating programmer chores.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @link http://book.cakephp.org/view/1523/Schema-management-and-migrations
|
* @link http://book.cakephp.org/view/1523/Schema-management-and-migrations
|
||||||
*/
|
*/
|
||||||
class SchemaShell extends Shell {
|
class SchemaShell extends Shell {
|
||||||
|
@ -299,7 +297,7 @@ class SchemaShell extends Shell {
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
*/
|
*/
|
||||||
function __create(&$Schema, $table = null) {
|
function __create($Schema, $table = null) {
|
||||||
$db = ConnectionManager::getDataSource($this->Schema->connection);
|
$db = ConnectionManager::getDataSource($this->Schema->connection);
|
||||||
|
|
||||||
$drop = $create = array();
|
$drop = $create = array();
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +24,7 @@ require_once CONSOLE_LIBS . 'console_option_parser.php';
|
||||||
/**
|
/**
|
||||||
* Base class for command-line utilities for automating programmer chores.
|
* Base class for command-line utilities for automating programmer chores.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
*/
|
*/
|
||||||
class Shell extends Object {
|
class Shell extends Object {
|
||||||
|
|
||||||
|
@ -220,6 +218,7 @@ class Shell extends Object {
|
||||||
if ($this->uses === null || $this->uses === false) {
|
if ($this->uses === null || $this->uses === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
App::import('Core', 'ClassRegistry');
|
||||||
|
|
||||||
if ($this->uses !== true && !empty($this->uses)) {
|
if ($this->uses !== true && !empty($this->uses)) {
|
||||||
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +22,7 @@ include_once dirname(__FILE__) . DS . 'bake.php';
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating controller files.
|
* Task class for creating and updating controller files.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class ControllerTask extends BakeTask {
|
class ControllerTask extends BakeTask {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating the database configuration file.
|
* Task class for creating and updating the database configuration file.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class DbConfigTask extends Shell {
|
class DbConfigTask extends Shell {
|
||||||
|
|
||||||
|
@ -106,7 +104,7 @@ class DbConfigTask extends Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'mysqli', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql');
|
$driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql');
|
||||||
|
|
||||||
$persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n');
|
$persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n');
|
||||||
if (strtolower($persistent) == 'n') {
|
if (strtolower($persistent) == 'n') {
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,8 +20,7 @@ App::import('Core', 'File');
|
||||||
/**
|
/**
|
||||||
* Language string extractor
|
* Language string extractor
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class ExtractTask extends Shell {
|
class ExtractTask extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -21,8 +20,7 @@ include_once dirname(__FILE__) . DS . 'bake.php';
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating fixtures files.
|
* Task class for creating and updating fixtures files.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class FixtureTask extends BakeTask {
|
class FixtureTask extends BakeTask {
|
||||||
|
|
||||||
|
@ -211,7 +209,6 @@ class FixtureTask extends BakeTask {
|
||||||
|
|
||||||
$this->_Schema = new CakeSchema();
|
$this->_Schema = new CakeSchema();
|
||||||
$data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection));
|
$data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection));
|
||||||
|
|
||||||
if (!isset($data['tables'][$useTable])) {
|
if (!isset($data['tables'][$useTable])) {
|
||||||
$this->err('Could not find your selected table ' . $useTable);
|
$this->err('Could not find your selected table ' . $useTable);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +22,7 @@ include_once dirname(__FILE__) . DS . 'bake.php';
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating model files.
|
* Task class for creating and updating model files.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class ModelTask extends BakeTask {
|
class ModelTask extends BakeTask {
|
||||||
|
|
||||||
|
@ -701,7 +699,7 @@ class ModelTask extends BakeTask {
|
||||||
protected function _generatePossibleKeys() {
|
protected function _generatePossibleKeys() {
|
||||||
$possible = array();
|
$possible = array();
|
||||||
foreach ($this->_tables as $otherTable) {
|
foreach ($this->_tables as $otherTable) {
|
||||||
$tempOtherModel = & new Model(array('table' => $otherTable, 'ds' => $this->connection));
|
$tempOtherModel = new Model(array('table' => $otherTable, 'ds' => $this->connection));
|
||||||
$modelFieldsTemp = $tempOtherModel->schema(true);
|
$modelFieldsTemp = $tempOtherModel->schema(true);
|
||||||
foreach ($modelFieldsTemp as $fieldName => $field) {
|
foreach ($modelFieldsTemp as $fieldName => $field) {
|
||||||
if ($field['type'] == 'integer' || $field['type'] == 'string') {
|
if ($field['type'] == 'integer' || $field['type'] == 'string') {
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -22,8 +21,7 @@ App::import('Core', 'File');
|
||||||
/**
|
/**
|
||||||
* Task class for creating a plugin
|
* Task class for creating a plugin
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class PluginTask extends Shell {
|
class PluginTask extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.bake
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +22,7 @@ App::import('Core', 'File');
|
||||||
/**
|
/**
|
||||||
* Task class for creating new project apps and plugins
|
* Task class for creating new project apps and plugins
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class ProjectTask extends Shell {
|
class ProjectTask extends Shell {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -24,8 +23,7 @@ App::import('Model', 'ClassRegistry');
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating test files.
|
* Task class for creating and updating test files.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class TestTask extends BakeTask {
|
class TestTask extends BakeTask {
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
* @since CakePHP(tm) v 1.2
|
* @since CakePHP(tm) v 1.2
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -23,8 +22,7 @@ include_once dirname(__FILE__) . DS . 'bake.php';
|
||||||
/**
|
/**
|
||||||
* Task class for creating and updating view files.
|
* Task class for creating and updating view files.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.console.shells.tasks
|
||||||
* @subpackage cake.cake.console.libs.tasks
|
|
||||||
*/
|
*/
|
||||||
class ViewTask extends BakeTask {
|
class ViewTask extends BakeTask {
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
|
* @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
|
||||||
* @package cake
|
* @package cake.console.shells
|
||||||
* @subpackage cake.cake.console.libs
|
|
||||||
* @since CakePHP(tm) v 1.2.0.4433
|
* @since CakePHP(tm) v 1.2.0.4433
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.template.objects
|
||||||
* @subpackage cake.console.libs.template.objects
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,13 +24,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public function <?php echo $admin ?>view($id = null) {
|
public function <?php echo $admin ?>view($id = null) {
|
||||||
if (!$id) {
|
$this-><?php echo $currentModelName; ?>->id = $id;
|
||||||
<?php if ($wannaUseSession): ?>
|
if (!$this-><?php echo $currentModelName; ?>->exists()) {
|
||||||
$this->Session->setFlash(__('Invalid <?php echo strtolower($singularHumanName) ?>'));
|
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
|
||||||
<?php else: ?>
|
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
|
||||||
<?php endif; ?>
|
|
||||||
}
|
}
|
||||||
$this->set('<?php echo $singularName; ?>', $this-><?php echo $currentModelName; ?>->read(null, $id));
|
$this->set('<?php echo $singularName; ?>', $this-><?php echo $currentModelName; ?>->read(null, $id));
|
||||||
}
|
}
|
||||||
|
@ -72,15 +67,11 @@
|
||||||
|
|
||||||
<?php $compact = array(); ?>
|
<?php $compact = array(); ?>
|
||||||
public function <?php echo $admin; ?>edit($id = null) {
|
public function <?php echo $admin; ?>edit($id = null) {
|
||||||
if (!$id && empty($this->request->data)) {
|
$this-><?php echo $currentModelName; ?>->id = $id;
|
||||||
<?php if ($wannaUseSession): ?>
|
if (!$this-><?php echo $currentModelName; ?>->exists()) {
|
||||||
$this->Session->setFlash(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action' => 'index'));
|
|
||||||
<?php else: ?>
|
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
|
||||||
<?php endif; ?>
|
|
||||||
}
|
}
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post') || $this->request->is('put')) {
|
||||||
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
|
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
|
||||||
|
@ -93,9 +84,8 @@
|
||||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.'));
|
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> could not be saved. Please, try again.'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if (!$this->request->is('post')) {
|
$this->request->data = $this-><?php echo $currentModelName; ?>->read(null, $id);
|
||||||
$this->data = $this-><?php echo $currentModelName; ?>->read(null, $id);
|
|
||||||
}
|
}
|
||||||
<?php
|
<?php
|
||||||
foreach (array('belongsTo', 'hasAndBelongsToMany') as $assoc):
|
foreach (array('belongsTo', 'hasAndBelongsToMany') as $assoc):
|
||||||
|
@ -118,15 +108,11 @@
|
||||||
if (!$this->request->is('post')) {
|
if (!$this->request->is('post')) {
|
||||||
throw new MethodNotAllowedException();
|
throw new MethodNotAllowedException();
|
||||||
}
|
}
|
||||||
if (!$id) {
|
$this-><?php echo $currentModelName; ?>->id = $id;
|
||||||
<?php if ($wannaUseSession): ?>
|
if (!$this-><?php echo $currentModelName; ?>->exists()) {
|
||||||
$this->Session->setFlash(__('Invalid id for <?php echo strtolower($singularHumanName); ?>'));
|
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
|
||||||
$this->redirect(array('action'=>'index'));
|
|
||||||
<?php else: ?>
|
|
||||||
$this->flash(__('Invalid <?php echo strtolower($singularHumanName); ?>'), array('action' => 'index'));
|
|
||||||
<?php endif; ?>
|
|
||||||
}
|
}
|
||||||
if ($this-><?php echo $currentModelName; ?>->delete($id)) {
|
if ($this-><?php echo $currentModelName; ?>->delete()) {
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted'));
|
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted'));
|
||||||
$this->redirect(array('action'=>'index'));
|
$this->redirect(array('action'=>'index'));
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.
|
||||||
* @subpackage cake.
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.
|
||||||
* @subpackage cake.
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.templates.objects
|
||||||
* @subpackage cake.console.libs.templates.objects
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.templates.objects
|
||||||
* @subpackage cake.console.libs.templates.objects
|
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.templates.views
|
||||||
* @subpackage cake.cake.console.libs.templates.views
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5234
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
<div class="<?php echo $pluralVar;?> form">
|
<div class="<?php echo $pluralVar;?> form">
|
||||||
<?php echo "<?php echo \$this->Form->create('{$modelClass}');?>\n";?>
|
<?php echo "<?php echo \$this->Form->create('{$modelClass}');?>\n";?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend><?php printf("<?php __('%s %s', true); ?>", Inflector::humanize($action), $singularHumanName); ?></legend>
|
<legend><?php printf("<?php __('%s %s'); ?>", Inflector::humanize($action), $singularHumanName); ?></legend>
|
||||||
<?php
|
<?php
|
||||||
echo "\t<?php\n";
|
echo "\t<?php\n";
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
$output = "<h2>Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!</h2>\n";
|
$output = "<h2>Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!</h2>\n";
|
||||||
$output .="
|
$output .="
|
||||||
<?php
|
<?php
|
||||||
|
App::import('Core', 'Debugger');
|
||||||
if (Configure::read() > 0):
|
if (Configure::read() > 0):
|
||||||
Debugger::checkSecurityKeys();
|
Debugger::checkSecurityKeys();
|
||||||
endif;
|
endif;
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.templates.views
|
||||||
* @subpackage cake.cake.console.libs.templates.views
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5234
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.console.libs.templates.views
|
||||||
* @subpackage cake.cake.console.libs.templates.views
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5234
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +26,7 @@
|
||||||
* Add your application-wide methods in the class below, your controllers
|
* Add your application-wide methods in the class below, your controllers
|
||||||
* will inherit them.
|
* will inherit them.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
*/
|
*/
|
||||||
class AppController extends Controller {
|
class AppController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +29,6 @@ App::import('Helper', 'Helper', false);
|
||||||
* will inherit them.
|
* will inherit them.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake
|
|
||||||
*/
|
*/
|
||||||
class AppHelper extends Helper {
|
class AppHelper extends Helper {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +26,7 @@
|
||||||
* Add your application-wide methods in the class below, your models
|
* Add your application-wide methods in the class below, your models
|
||||||
* will inherit them.
|
* will inherit them.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
*/
|
*/
|
||||||
class AppModel extends Model {
|
class AppModel extends Model {
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
; *
|
; *
|
||||||
; * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
; * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
; * @link http://cakephp.org CakePHP(tm) Project
|
; * @link http://cakephp.org CakePHP(tm) Project
|
||||||
; * @package cake
|
; * @package app.config
|
||||||
; * @subpackage cake.app.config
|
|
||||||
; * @since CakePHP(tm) v 0.10.0.1076
|
; * @since CakePHP(tm) v 0.10.0.1076
|
||||||
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
; * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
; */
|
; */
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.10.8.2117
|
* @since CakePHP(tm) v 0.10.8.2117
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,16 +14,14 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* In this file you set up your database connection details.
|
* In this file you set up your database connection details.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.config
|
||||||
* @subpackage cake.config
|
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Database configuration class.
|
* Database configuration class.
|
||||||
|
@ -31,7 +29,6 @@
|
||||||
*
|
*
|
||||||
* driver => The name of a supported driver; valid options are as follows:
|
* driver => The name of a supported driver; valid options are as follows:
|
||||||
* mysql - MySQL 4 & 5,
|
* mysql - MySQL 4 & 5,
|
||||||
* mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
|
|
||||||
* sqlite - SQLite (PHP5 only),
|
* sqlite - SQLite (PHP5 only),
|
||||||
* postgres - PostgreSQL 7 and higher,
|
* postgres - PostgreSQL 7 and higher,
|
||||||
* mssql - Microsoft SQL Server 2000 and higher,
|
* mssql - Microsoft SQL Server 2000 and higher,
|
||||||
|
@ -56,7 +53,7 @@
|
||||||
* 'public', DB2 defaults to empty.
|
* 'public', DB2 defaults to empty.
|
||||||
*
|
*
|
||||||
* encoding =>
|
* encoding =>
|
||||||
* For MySQL, MySQLi, Postgres specifies the character encoding to use when connecting to the
|
* For MySQL, Postgres and Sqlite, specifies the character encoding to use when connecting to the
|
||||||
* database. Uses database default.
|
* database. Uses database default.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config
|
||||||
* @subpackage cake.app.config
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.config.sql
|
||||||
* @subpackage cake.app.config.sql
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
#
|
#
|
||||||
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
# @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
# @link http://cakephp.org CakePHP(tm) Project
|
# @link http://cakephp.org CakePHP(tm) Project
|
||||||
# @package cake
|
# @package app.console
|
||||||
# @subpackage cake.app.console
|
|
||||||
# @since CakePHP(tm) v 2.0
|
# @since CakePHP(tm) v 2.0
|
||||||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
#
|
#
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
::
|
::
|
||||||
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
:: @copyright Copyright 2005-2010, Cake Software Foundation, Inc.
|
||||||
:: @link http://cakephp.org CakePHP(tm) Project
|
:: @link http://cakephp.org CakePHP(tm) Project
|
||||||
:: @package cake
|
:: @package app.console
|
||||||
:: @subpackage cake.app.console
|
|
||||||
:: @since CakePHP(tm) v 2.0
|
:: @since CakePHP(tm) v 2.0
|
||||||
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
::
|
::
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app.console
|
||||||
* @subpackage cake.cake.console
|
|
||||||
* @since CakePHP(tm) v 1.2.0.5012
|
* @since CakePHP(tm) v 1.2.0.5012
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.libs.controller
|
||||||
* @subpackage cake.cake.libs.controller
|
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
@ -25,8 +24,7 @@
|
||||||
*
|
*
|
||||||
* Override this controller by placing a copy in controllers directory of an application
|
* Override this controller by placing a copy in controllers directory of an application
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake.libs.controller
|
||||||
* @subpackage cake.cake.libs.controller
|
|
||||||
*/
|
*/
|
||||||
class PagesController extends AppController {
|
class PagesController extends AppController {
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package app
|
||||||
* @subpackage cake.app
|
|
||||||
* @since CakePHP(tm) v 0.10.0.1076
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.libs.view.templates.elements.email.html
|
||||||
* @subpackage cake.cake.libs.view.templates.elements.email.html
|
|
||||||
* @since CakePHP(tm) v 0.10.0.1076
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.libs.view.templates.elements.email.text
|
||||||
* @subpackage cake.cake.libs.view.templates.elements.email.text
|
|
||||||
* @since CakePHP(tm) v 0.10.0.1076
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake.libs.view.templates.layouts
|
||||||
* @subpackage cake.cake.libs.view.templates.layouts
|
|
||||||
* @since CakePHP(tm) v 0.10.0.1076
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue