diff --git a/app/console/shells/empty b/app/Console/Command/Task/empty similarity index 100% rename from app/console/shells/empty rename to app/Console/Command/Task/empty diff --git a/app/console/shells/tasks/empty b/app/Console/Command/empty similarity index 100% rename from app/console/shells/tasks/empty rename to app/Console/Command/empty diff --git a/app/console/cake b/app/Console/cake similarity index 100% rename from app/console/cake rename to app/Console/cake diff --git a/app/console/cake.bat b/app/Console/cake.bat similarity index 100% rename from app/console/cake.bat rename to app/Console/cake.bat diff --git a/app/console/cake.php b/app/Console/cake.php old mode 100755 new mode 100644 similarity index 86% rename from app/console/cake.php rename to app/Console/cake.php index 9200fd36b..ef5e26816 --- a/app/console/cake.php +++ b/app/Console/cake.php @@ -19,6 +19,6 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'console' . DIRECTORY_SEPARATOR . 'shell_dispatcher.php'); +require_once(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'lib'. DIRECTORY_SEPARATOR . 'Cake' . DIRECTORY_SEPARATOR . 'Console' . DIRECTORY_SEPARATOR . 'ShellDispatcher.php'); return ShellDispatcher::run($argv); diff --git a/app/console/shells/templates/empty b/app/Console/templates/empty similarity index 100% rename from app/console/shells/templates/empty rename to app/Console/templates/empty diff --git a/app/controllers/components/empty b/app/Controller/Component/empty similarity index 100% rename from app/controllers/components/empty rename to app/Controller/Component/empty diff --git a/app/libs/empty b/app/Lib/empty similarity index 100% rename from app/libs/empty rename to app/Lib/empty diff --git a/app/models/behaviors/empty b/app/Model/Behavior/empty similarity index 100% rename from app/models/behaviors/empty rename to app/Model/Behavior/empty diff --git a/app/models/datasources/empty b/app/Model/Datasource/empty similarity index 100% rename from app/models/datasources/empty rename to app/Model/Datasource/empty diff --git a/app/tests/cases/behaviors/empty b/app/View/Helper/empty similarity index 100% rename from app/tests/cases/behaviors/empty rename to app/View/Helper/empty diff --git a/app/tests/cases/components/empty b/app/View/elements/email/html/empty similarity index 100% rename from app/tests/cases/components/empty rename to app/View/elements/email/html/empty diff --git a/app/tests/cases/controllers/empty b/app/View/elements/email/text/empty similarity index 100% rename from app/tests/cases/controllers/empty rename to app/View/elements/email/text/empty diff --git a/app/tests/cases/helpers/empty b/app/View/elements/empty similarity index 100% rename from app/tests/cases/helpers/empty rename to app/View/elements/empty diff --git a/app/tests/cases/models/empty b/app/View/errors/empty similarity index 100% rename from app/tests/cases/models/empty rename to app/View/errors/empty diff --git a/app/tests/fixtures/empty b/app/View/layouts/email/html/empty similarity index 100% rename from app/tests/fixtures/empty rename to app/View/layouts/email/html/empty diff --git a/app/tests/groups/empty b/app/View/layouts/email/text/empty similarity index 100% rename from app/tests/groups/empty rename to app/View/layouts/email/text/empty diff --git a/app/views/elements/email/html/empty b/app/View/layouts/js/empty similarity index 100% rename from app/views/elements/email/html/empty rename to app/View/layouts/js/empty diff --git a/app/views/elements/email/text/empty b/app/View/layouts/rss/empty similarity index 100% rename from app/views/elements/email/text/empty rename to app/View/layouts/rss/empty diff --git a/app/views/elements/empty b/app/View/layouts/xml/empty similarity index 100% rename from app/views/elements/empty rename to app/View/layouts/xml/empty diff --git a/app/views/errors/empty b/app/View/pages/empty similarity index 100% rename from app/views/errors/empty rename to app/View/pages/empty diff --git a/app/views/helpers/empty b/app/View/scaffolds/empty similarity index 100% rename from app/views/helpers/empty rename to app/View/scaffolds/empty diff --git a/app/config/database.php.default b/app/config/database.php.default index 9fb8e9e98..b7eb4bba2 100644 --- a/app/config/database.php.default +++ b/app/config/database.php.default @@ -28,15 +28,15 @@ * You can specify multiple configurations for production, development and testing. * * driver => The name of a supported driver; valid options are as follows: - * mysql - MySQL 4 & 5, - * sqlite - SQLite (PHP5 only), - * postgres - PostgreSQL 7 and higher, - * mssql - Microsoft SQL Server 2000 and higher, - * oracle - Oracle 8 and higher + * Datasabe/Mysql - MySQL 4 & 5, + * Datasabe/Sqlite - SQLite (PHP5 only), + * Datasabe/Postgres - PostgreSQL 7 and higher, + * Datasabe/Mssql - Microsoft SQL Server 2000 and higher, + * Datasabe/Oracle - Oracle 8 and higher * * You can add custom database drivers (or override existing drivers) by adding the - * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php', - * where 'x' is the name of the database. + * appropriate file to app/models/datasources/database. Drivers should be named 'MyDriver.php', + * * * persistent => true / false * Determines whether or not the database should use a persistent connection @@ -59,7 +59,7 @@ class DATABASE_CONFIG { public $default = array( - 'driver' => 'mysql', + 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', @@ -69,7 +69,7 @@ class DATABASE_CONFIG { ); public $test = array( - 'driver' => 'mysql', + 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', diff --git a/app/views/layouts/email/html/empty b/app/tests/Case/Controller/Component/empty similarity index 100% rename from app/views/layouts/email/html/empty rename to app/tests/Case/Controller/Component/empty diff --git a/app/views/layouts/email/text/empty b/app/tests/Case/Controller/empty similarity index 100% rename from app/views/layouts/email/text/empty rename to app/tests/Case/Controller/empty diff --git a/app/views/layouts/js/empty b/app/tests/Case/Model/Behavior/empty similarity index 100% rename from app/views/layouts/js/empty rename to app/tests/Case/Model/Behavior/empty diff --git a/app/views/layouts/rss/empty b/app/tests/Case/Model/empty similarity index 100% rename from app/views/layouts/rss/empty rename to app/tests/Case/Model/empty diff --git a/app/views/layouts/xml/empty b/app/tests/Case/View/Helper/empty similarity index 100% rename from app/views/layouts/xml/empty rename to app/tests/Case/View/Helper/empty diff --git a/app/views/pages/empty b/app/tests/Fixture/empty similarity index 100% rename from app/views/pages/empty rename to app/tests/Fixture/empty diff --git a/app/tmp/cache/models/empty b/app/tmp/cache/models/empty old mode 100755 new mode 100644 diff --git a/app/tmp/cache/views/empty b/app/tmp/cache/views/empty old mode 100755 new mode 100644 diff --git a/app/tmp/logs/empty b/app/tmp/logs/empty old mode 100755 new mode 100644 diff --git a/app/tmp/sessions/empty b/app/tmp/sessions/empty old mode 100755 new mode 100644 diff --git a/app/tmp/tests/empty b/app/tmp/tests/empty old mode 100755 new mode 100644 diff --git a/app/webroot/index.php b/app/webroot/index.php index f1ff8d197..3c5e71589 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -49,7 +49,7 @@ * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } /** @@ -67,7 +67,7 @@ define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } - if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } @@ -75,6 +75,6 @@ return; } - require LIBS . 'dispatcher.php'; + App::uses('Dispatcher', 'Routing'); $Dispatcher = new Dispatcher(); $Dispatcher->dispatch(new CakeRequest()); diff --git a/app/webroot/test.php b/app/webroot/test.php index c11aaac99..ffcedfe39 100644 --- a/app/webroot/test.php +++ b/app/webroot/test.php @@ -45,11 +45,11 @@ ini_set('display_errors', 1); define('APP_DIR', basename(dirname(dirname(__FILE__)))); } /** - * The absolute path to the "cake" directory, WITHOUT a trailing DS. + * The absolute path to the "Cake" directory, WITHOUT a trailing DS. * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } /** @@ -67,21 +67,14 @@ if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } -if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { +if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } -$corePath = App::core('cake'); -if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); -} else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); -} - if (Configure::read('debug') < 1) { - die(__('Debug setting does not allow access to this url.')); + die(__d('cake', 'Debug setting does not allow access to this url.')); } -require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; +require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); diff --git a/cake/bootstrap.php b/cake/bootstrap.php deleted file mode 100644 index aa30770fc..000000000 --- a/cake/bootstrap.php +++ /dev/null @@ -1,39 +0,0 @@ - array('suffix' => '.php', 'extends' => null, 'core' => true), - 'file' => array('suffix' => '.php', 'extends' => null, 'core' => true), - 'model' => array('suffix' => '.php', 'extends' => 'AppModel', 'core' => false), - 'behavior' => array('suffix' => '.php', 'extends' => 'ModelBehavior', 'core' => true), - 'controller' => array('suffix' => '_controller.php', 'extends' => 'AppController', 'core' => true), - 'component' => array('suffix' => '.php', 'extends' => null, 'core' => true), - 'lib' => array('suffix' => '.php', 'extends' => null, 'core' => true), - 'view' => array('suffix' => '.php', 'extends' => null, 'core' => true), - 'helper' => array('suffix' => '.php', 'extends' => 'AppHelper', 'core' => true), - 'vendor' => array('suffix' => '', 'extends' => null, 'core' => true), - 'shell' => array('suffix' => '.php', 'extends' => 'Shell', 'core' => true), - 'plugin' => array('suffix' => '', 'extends' => null, 'core' => true) - ); - -/** - * List of additional path(s) where model files reside. - * - * @var array - */ - public static $models = array(); - -/** - * List of additional path(s) where behavior files reside. - * - * @var array - */ - public static $behaviors = array(); - -/** - * List of additional path(s) where controller files reside. - * - * @var array - */ - public static $controllers = array(); - -/** - * List of additional path(s) where component files reside. - * - * @var array - */ - public static $components = array(); - -/** - * List of additional path(s) where datasource files reside. - * - * @var array - */ - public static $datasources = array(); - -/** - * List of additional path(s) where libs files reside. - * - * @var array - */ - public static $libs = array(); - -/** - * List of additional path(s) where view files reside. - * - * @var array - */ - public static $views = array(); - -/** - * List of additional path(s) where helper files reside. - * - * @var array - */ - public static $helpers = array(); - -/** - * List of additional path(s) where plugins reside. - * - * @var array - */ - public static $plugins = array(); - -/** - * List of additional path(s) where vendor packages reside. - * - * @var array - */ - public static $vendors = array(); - -/** - * List of additional path(s) where locale files reside. - * - * @var array - */ - public static $locales = array(); - -/** - * List of additional path(s) where console shell files reside. - * - * @var array - */ - public static $shells = array(); - -/** - * Paths to search for files. - * - * @var array - */ - public static $search = array(); - -/** - * Whether or not to return the file that is loaded. - * - * @var boolean - */ - public static $return = false; - -/** - * Determines if $__maps and $__paths cache should be written. - * - * @var boolean - */ - private static $__cache = false; - -/** - * Holds key/value pairs of $type => file path. - * - * @var array - */ - private static $__map = array(); - -/** - * Holds paths for deep searching of files. - * - * @var array - */ - private static $__paths = array(); - -/** - * Holds loaded files. - * - * @var array - */ - private static $__loaded = array(); - -/** - * Holds and key => value array of object types. - * - * @var array - */ - private static $__objects = array(); - -/** - * Used to read information stored path - * - * Usage: - * - * `App::path('models'); will return all paths for models` - * - * @param string $type type of path - * @return string array - */ - public static function path($type) { - if (!isset(self::${$type})) { - return array(); - } - return self::${$type}; - } - -/** - * Build path references. Merges the supplied $paths - * with the base paths and the default core paths. - * - * @param array $paths paths defines in config/bootstrap.php - * @param boolean $reset true will set paths, false merges paths [default] false - * @return void - */ - public static function build($paths = array(), $reset = false) { - $defaults = array( - 'models' => array(MODELS), - 'behaviors' => array(BEHAVIORS), - 'datasources' => array(MODELS . 'datasources'), - 'controllers' => array(CONTROLLERS), - 'components' => array(COMPONENTS), - 'libs' => array(APPLIBS), - 'views' => array(VIEWS), - 'helpers' => array(HELPERS), - 'locales' => array(APP . 'locale' . DS), - 'shells' => array( - APP . 'console' . DS . 'shells' . DS, - APP . 'vendors' . DS . 'shells' . DS, - VENDORS . 'shells' . DS - ), - 'vendors' => array(APP . 'vendors' . DS, VENDORS), - 'plugins' => array(APP . 'plugins' . DS) - ); - - if ($reset == true) { - foreach ($paths as $type => $new) { - self::${$type} = (array)$new; - } - return $paths; - } - - $core = self::core(); - $app = array('models' => true, 'controllers' => true, 'helpers' => true); - - foreach ($defaults as $type => $default) { - $merge = array(); - - if (isset($app[$type])) { - $merge = array(APP); - } - if (isset($core[$type])) { - $merge = array_merge($merge, (array)$core[$type]); - } - - if (empty(self::${$type}) || empty($paths)) { - self::${$type} = $default; - } - - if (!empty($paths[$type])) { - $path = array_flip(array_flip(array_merge( - (array)$paths[$type], self::${$type}, $merge - ))); - } else { - $path = array_flip(array_flip(array_merge(self::${$type}, $merge))); - } - self::${$type} = array_values($path); - } - } - -/** - * Get the path that a plugin is on. Searches through the defined plugin paths. - * - * @param string $plugin CamelCased/lower_cased plugin name to find the path of. - * @return string full path to the plugin. - */ - public static function pluginPath($plugin) { - $pluginDir = Inflector::underscore($plugin); - for ($i = 0, $length = count(self::$plugins); $i < $length; $i++) { - if (is_dir(self::$plugins[$i] . $pluginDir)) { - return self::$plugins[$i] . $pluginDir . DS ; - } - } - return self::$plugins[0] . $pluginDir . DS; - } - -/** - * Find the path that a theme is on. Search through the defined theme paths. - * - * @param string $theme lower_cased theme name to find the path of. - * @return string full path to the theme. - */ - public static function themePath($theme) { - $themeDir = 'themed' . DS . Inflector::underscore($theme); - for ($i = 0, $length = count(self::$views); $i < $length; $i++) { - if (is_dir(self::$views[$i] . $themeDir)) { - return self::$views[$i] . $themeDir . DS ; - } - } - return self::$views[0] . $themeDir . DS; - } - -/** - * Returns a key/value list of all paths where core libs are found. - * Passing $type only returns the values for a given value of $key. - * - * @param string $type valid values are: 'model', 'behavior', 'controller', 'component', - * 'view', 'helper', 'datasource', 'libs', and 'cake' - * @return array numeric keyed array of core lib paths - */ - public static function core($type = null) { - static $paths = false; - if (!$paths) { - $paths = array(); - $libs = dirname(__FILE__) . DS; - $cake = dirname($libs) . DS; - $path = dirname($cake) . DS; - - $paths['cake'][] = $cake; - $paths['libs'][] = $libs; - $paths['models'][] = $libs . 'model' . DS; - $paths['datasources'][] = $libs . 'model' . DS . 'datasources' . DS; - $paths['behaviors'][] = $libs . 'model' . DS . 'behaviors' . DS; - $paths['controllers'][] = $libs . 'controller' . DS; - $paths['components'][] = $libs . 'controller' . DS . 'components' . DS; - $paths['views'][] = $libs . 'view' . DS; - $paths['helpers'][] = $libs . 'view' . DS . 'helpers' . DS; - $paths['plugins'][] = $path . 'plugins' . DS; - $paths['vendors'][] = $path . 'vendors' . DS; - $paths['shells'][] = $cake . 'console' . DS . 'shells' . DS; - // Provide BC path to vendors/shells - $paths['shells'][] = $path . 'vendors' . DS . 'shells' . DS; - } - if ($type && isset($paths[$type])) { - return $paths[$type]; - } - return $paths; - } - -/** - * Returns an array of objects of the given type. - * - * Example usage: - * - * `App::objects('plugin');` returns `array('DebugKit', 'Blog', 'User');` - * - * You can also search only within a plugin's objects by using the plugin dot - * syntax (these objects are not cached): - * - * `App::objects('MyPlugin.model');` returns `array('Post', 'Comment');` - * - * @param string $type Type of object, i.e. 'model', 'controller', 'helper', or 'plugin' - * @param mixed $path Optional Scan only the path given. If null, paths for the chosen - * type will be used. - * @param boolean $cache Set to false to rescan objects of the chosen type. Defaults to true. - * @return mixed Either false on incorrect / miss. Or an array of found objects. - */ - public static function objects($type, $path = null, $cache = true) { - $objects = array(); - $extension = false; - list($plugin, $type) = pluginSplit($type); - $name = $type; - - if ($plugin) { - $path = Inflector::pluralize($type); - if ($path == 'helpers') { - $path = 'views' . DS .$path; - } elseif ($path == 'behaviors') { - $path = 'models' . DS .$path; - } elseif ($path == 'components') { - $path = 'controllers' . DS .$path; - } - $path = self::pluginPath($plugin) . $path; - $cache = false; - } - - if ($type === 'file' && !$path) { - return false; - } elseif ($type === 'file') { - $extension = true; - $name = $type . str_replace(DS, '', $path); - } - - if (empty(self::$__objects) && $cache === true) { - self::$__objects = Cache::read('object_map', '_cake_core_'); - } - - if (!isset(self::$__objects[$name]) || $cache !== true) { - $types = self::$types; - - if (!isset($types[$type])) { - return false; - } - $objects = array(); - - if (empty($path)) { - $path = self::${"{$type}s"}; - if (isset($types[$type]['core']) && $types[$type]['core'] === false) { - array_pop($path); - } - } - $items = array(); - - foreach ((array)$path as $dir) { - if ($dir != APP) { - $items = self::__list($dir, $types[$type]['suffix'], $extension); - $objects = array_merge($items, array_diff($objects, $items)); - } - } - - if ($type !== 'file') { - foreach ($objects as $key => $value) { - $objects[$key] = Inflector::camelize($value); - } - } - - if ($cache === true) { - self::$__cache = true; - } - if ($plugin) { - return $objects; - } - self::$__objects[$name] = $objects; - } - - return self::$__objects[$name]; - } - -/** - * Allows you to modify the object listings that App maintains inside of it - * Useful for testing - * - * @param string $type Type of object listing you are changing - * @param array $values The values $type should be set to. - * @return void - */ - public static function setObjects($type, $values) { - self::$__objects[$type] = $values; - } - -/** - * Finds classes based on $name or specific file(s) to search. Calling App::import() will - * not construct any classes contained in the files. It will only find and require() the file. - * - * @link http://book.cakephp.org/view/934/Using-App-import - * @param mixed $type The type of Class if passed as a string, or all params can be passed as - * an single array to $type, - * @param string $name Name of the Class or a unique name for the file - * @param mixed $parent boolean true if Class Parent should be searched, accepts key => value - * array('parent' => $parent ,'file' => $file, 'search' => $search, 'ext' => '$ext'); - * $ext allows setting the extension of the file name - * based on Inflector::underscore($name) . ".$ext"; - * @param array $search paths to search for files, array('path 1', 'path 2', 'path 3'); - * @param string $file full name of the file to search for including extension - * @param boolean $return, return the loaded file, the file must have a return - * statement in it to work: return $variable; - * @return boolean true if Class is already in memory or if file is found and loaded, false if not - */ - public static function import($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false) { - $plugin = $directory = null; - - if (is_array($type)) { - extract($type, EXTR_OVERWRITE); - } - - if (is_array($parent)) { - extract($parent, EXTR_OVERWRITE); - } - - if ($name === null && $file === null) { - $name = $type; - $type = 'Core'; - } elseif ($name === null) { - $type = 'File'; - } - - if (is_array($name)) { - foreach ($name as $class) { - $tempType = $type; - $plugin = null; - - if (strpos($class, '.') !== false) { - $value = explode('.', $class); - $count = count($value); - - if ($count > 2) { - $tempType = $value[0]; - $plugin = $value[1] . '.'; - $class = $value[2]; - } elseif ($count === 2 && ($type === 'Core' || $type === 'File')) { - $tempType = $value[0]; - $class = $value[1]; - } else { - $plugin = $value[0] . '.'; - $class = $value[1]; - } - } - - if (!App::import($tempType, $plugin . $class, $parent)) { - return false; - } - } - return true; - } - - if ($name != null && strpos($name, '.') !== false) { - list($plugin, $name) = explode('.', $name); - $plugin = Inflector::camelize($plugin); - } - self::$return = $return; - - if (isset($ext)) { - $file = Inflector::underscore($name) . ".{$ext}"; - } - $ext = self::__settings($type, $plugin, $parent); - $className = $name; - if (strpos($className, '/') !== false) { - $className = substr($className, strrpos($className, '/') + 1); - } - if ($name != null && !class_exists($className . $ext['class'])) { - if ($load = self::__mapped($name . $ext['class'], $type, $plugin)) { - if (self::__load($load)) { - if (self::$return) { - return include($load); - } - return true; - } else { - self::__remove($name . $ext['class'], $type, $plugin); - self::$__cache = true; - } - } - if (!empty($search)) { - self::$search = $search; - } elseif ($plugin) { - self::$search = self::__paths('plugin'); - } else { - self::$search = self::__paths($type); - } - $find = $file; - - if ($find === null) { - $find = Inflector::underscore($name . $ext['suffix']).'.php'; - - if ($plugin) { - $paths = self::$search; - foreach ($paths as $key => $value) { - self::$search[$key] = $value . $ext['path']; - } - } - } - - if (strtolower($type) !== 'vendor' && empty($search) && self::__load($file)) { - $directory = false; - } else { - $file = $find; - $directory = self::__find($find, true); - } - - if ($directory !== null) { - self::$__cache = true; - self::__map($directory . $file, $name . $ext['class'], $type, $plugin); - - if (self::$return) { - return include($directory . $file); - } - return true; - } - return false; - } - return true; - } - -/** - * Initializes the cache for App, registers a shutdown function. - * - * @return void - */ - public static function init() { - self::$__map = (array)Cache::read('file_map', '_cake_core_'); - register_shutdown_function(array('App', 'shutdown')); - } - -/** - * Locates the $file in $__paths, searches recursively. - * - * @param string $file full file name - * @param boolean $recursive search $__paths recursively - * @return mixed boolean on fail, $file directory path on success - */ - private static function __find($file, $recursive = true) { - static $appPath = false; - - if (empty(self::$search)) { - return null; - } elseif (is_string(self::$search)) { - self::$search = array(self::$search); - } - - if (empty(self::$__paths)) { - self::$__paths = Cache::read('dir_map', '_cake_core_'); - } - - foreach (self::$search as $path) { - if ($appPath === false) { - $appPath = rtrim(APP, DS); - } - $path = rtrim($path, DS); - - if ($path === $appPath) { - $recursive = false; - } - if ($recursive === false) { - if (self::__load($path . DS . $file)) { - return $path . DS; - } - continue; - } - - if (!isset(self::$__paths[$path])) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } - $Folder = new Folder(); - $directories = $Folder->tree($path, array('.svn', '.git', 'CVS', 'tests', 'templates'), 'dir'); - sort($directories); - self::$__paths[$path] = $directories; - } - - foreach (self::$__paths[$path] as $directory) { - if (self::__load($directory . DS . $file)) { - return $directory . DS; - } - } - } - return null; - } - -/** - * Attempts to load $file. - * - * @param string $file full path to file including file name - * @return boolean - * @access private - */ - private static function __load($file) { - if (empty($file)) { - return false; - } - if (!self::$return && isset(self::$__loaded[$file])) { - return true; - } - if (file_exists($file)) { - if (!self::$return) { - require($file); - self::$__loaded[$file] = true; - } - return true; - } - return false; - } - -/** - * Maps the $name to the $file. - * - * @param string $file full path to file - * @param string $name unique name for this map - * @param string $type type object being mapped - * @param string $plugin camelized if object is from a plugin, the name of the plugin - * @return void - * @access private - */ - private static function __map($file, $name, $type, $plugin) { - if ($plugin) { - self::$__map['Plugin'][$plugin][$type][$name] = $file; - } else { - self::$__map[$type][$name] = $file; - } - } - -/** - * Returns a file's complete path. - * - * @param string $name unique name - * @param string $type type object - * @param string $plugin camelized if object is from a plugin, the name of the plugin - * @return mixed, file path if found, false otherwise - * @access private - */ - private static function __mapped($name, $type, $plugin) { - if ($plugin) { - if (isset(self::$__map['Plugin'][$plugin][$type]) && isset(self::$__map['Plugin'][$plugin][$type][$name])) { - return self::$__map['Plugin'][$plugin][$type][$name]; - } - return false; - } - - if (isset(self::$__map[$type]) && isset(self::$__map[$type][$name])) { - return self::$__map[$type][$name]; - } - return false; - } - -/** - * Loads parent classes based on $type. - * Returns a prefix or suffix needed for loading files. - * - * @param string $type type of object - * @param string $plugin camelized name of plugin - * @param boolean $parent false will not attempt to load parent - * @return array - * @access private - */ - private static function __settings($type, $plugin, $parent) { - if (!$parent) { - return array('class' => null, 'suffix' => null, 'path' => null); - } - - if ($plugin) { - $pluginPath = Inflector::underscore($plugin); - } - $path = null; - $load = strtolower($type); - - switch ($load) { - case 'model': - if (!class_exists('Model')) { - require LIBS . 'model' . DS . 'model.php'; - } - if (!class_exists('AppModel')) { - App::import($type, 'AppModel', false); - } - if ($plugin) { - if (!class_exists($plugin . 'AppModel')) { - App::import($type, $plugin . '.' . $plugin . 'AppModel', false, array(), $pluginPath . DS . $pluginPath . '_app_model.php'); - } - $path = $pluginPath . DS . 'models' . DS; - } - return array('class' => null, 'suffix' => null, 'path' => $path); - break; - case 'behavior': - if ($plugin) { - $path = $pluginPath . DS . 'models' . DS . 'behaviors' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - break; - case 'datasource': - if ($plugin) { - $path = $pluginPath . DS . 'models' . DS . 'datasources' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - case 'controller': - App::import($type, 'AppController', false); - if ($plugin) { - App::import($type, $plugin . '.' . $plugin . 'AppController', false, array(), $pluginPath . DS . $pluginPath . '_app_controller.php'); - $path = $pluginPath . DS . 'controllers' . DS; - } - return array('class' => $type, 'suffix' => $type, 'path' => $path); - break; - case 'component': - App::import('Core', 'Component', false); - if ($plugin) { - $path = $pluginPath . DS . 'controllers' . DS . 'components' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - break; - case 'lib': - if ($plugin) { - $path = $pluginPath . DS . 'libs' . DS; - } - return array('class' => null, 'suffix' => null, 'path' => $path); - break; - case 'view': - App::import('View', 'View', false); - if ($plugin) { - $path = $pluginPath . DS . 'views' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - break; - case 'helper': - if (!class_exists('AppHelper')) { - App::import($type, 'AppHelper', false); - } - if ($plugin) { - $path = $pluginPath . DS . 'views' . DS . 'helpers' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - break; - case 'shell': - if (!class_exists('Shell')) { - App::import($type, 'Shell', false); - } - if (!class_exists('AppShell')) { - App::import($type, 'AppShell', false); - } - if ($plugin) { - $path = $pluginPath . DS . 'console' . DS . 'shells' . DS; - } - return array('class' => $type, 'suffix' => null, 'path' => $path); - break; - case 'vendor': - if ($plugin) { - $path = $pluginPath . DS . 'vendors' . DS; - } - return array('class' => null, 'suffix' => null, 'path' => $path); - break; - default: - $type = $suffix = $path = null; - break; - } - return array('class' => null, 'suffix' => null, 'path' => null); - } - -/** - * Returns default search paths. - * - * @param string $type type of object to be searched - * @return array list of paths - */ - private static function __paths($type) { - $type = strtolower($type); - $paths = array(); - - if ($type === 'core') { - return App::core('libs'); - } - if (isset(self::${$type . 's'})) { - return self::${$type . 's'}; - } - return $paths; - } - -/** - * Removes file location from map if the file has been deleted. - * - * @param string $name name of object - * @param string $type type of object - * @param string $plugin camelized name of plugin - * @return void - */ - private static function __remove($name, $type, $plugin) { - if ($plugin) { - unset(self::$__map['Plugin'][$plugin][$type][$name]); - } else { - unset(self::$__map[$type][$name]); - } - } - -/** - * Returns an array of filenames of PHP files in the given directory. - * - * @param string $path Path to scan for files - * @param string $suffix if false, return only directories. if string, match and return files - * @return array List of directories or files in directory - */ - private static function __list($path, $suffix = false, $extension = false) { - if (!class_exists('Folder')) { - require LIBS . 'folder.php'; - } - $items = array(); - $Folder = new Folder($path); - $contents = $Folder->read(false, true); - - if (is_array($contents)) { - if (!$suffix) { - return $contents[0]; - } else { - foreach ($contents[1] as $item) { - if (substr($item, - strlen($suffix)) === $suffix) { - if ($extension) { - $items[] = $item; - } else { - $items[] = substr($item, 0, strlen($item) - strlen($suffix)); - } - } - } - } - } - return $items; - } - -/** - * Object destructor. - * - * Writes cache file if changes have been made to the $__map or $__paths - * - * @return void - */ - public static function shutdown() { - if (self::$__cache) { - $core = App::core('cake'); - unset(self::$__paths[rtrim($core[0], DS)]); - Cache::write('dir_map', array_filter(self::$__paths), '_cake_core_'); - Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); - Cache::write('object_map', self::$__objects, '_cake_core_'); - } - } -} diff --git a/cake/libs/magic_db.php b/cake/libs/magic_db.php deleted file mode 100644 index 86a91d82d..000000000 --- a/cake/libs/magic_db.php +++ /dev/null @@ -1,291 +0,0 @@ -exists()) { - return false; - } - if ($File->ext() == 'php') { - include($File->pwd()); - $data = $magicDb; - } else { - // @TODO: Needs test coverage - $data = $File->read(); - } - } - - $magicDb = $this->toArray($data); - if (!$this->validates($magicDb)) { - return false; - } - return !!($this->db = $magicDb); - } - -/** - * Parses a MagicDb $data string into an array or returns the current MagicDb instance as an array - * - * @param string $data A MagicDb string to turn into an array - * @return array A parsed MagicDb array or an empty array if the $data param was invalid. Returns the db property if $data is not set. - */ - public function toArray($data = null) { - if (is_array($data)) { - return $data; - } - if ($data === null) { - return $this->db; - } - - if (strpos($data, '# FILE_ID DB') !== 0) { - return array(); - } - - $lines = explode("\r\n", $data); - $db = array(); - - $validHeader = count($lines) > 3 - && preg_match('/^# Date:([0-9]{4}-[0-9]{2}-[0-9]{2})$/', $lines[1], $date) - && preg_match('/^# Source:(.+)$/', $lines[2], $source) - && strlen($lines[3]) == 0; - if (!$validHeader) { - return $db; - } - - $db = array('header' => array('Date' => $date[1], 'Source' => $source[1]), 'database' => array()); - $lines = array_splice($lines, 3); - - $format = array(); - while (!empty($lines)) { - $line = array_shift($lines); - if (isset($line[0]) && $line[0] == '#' || empty($line)) { - continue; - } - - $columns = explode("\t", $line); - if (in_array($columns[0]{0}, array('>', '&'))) { - $format[] = $columns; - } elseif (!empty($format)) { - $db['database'][] = $format; - $format = array($columns); - } else { - $format = array($columns); - } - } - - return $db; - } - -/** - * Returns true if the MagicDb instance or the passed $magicDb is valid - * - * @param mixed $magicDb A $magicDb string / array to validate (optional) - * @return boolean True if the $magicDb / instance db validates, false if not - */ - public function validates($magicDb = null) { - if (is_null($magicDb)) { - $magicDb = $this->db; - } elseif (!is_array($magicDb)) { - $magicDb = $this->toArray($magicDb); - } - - return isset($magicDb['header'], $magicDb['database']) && is_array($magicDb['header']) && is_array($magicDb['database']); - } - -/** - * Analyzes a given $file using the currently loaded MagicDb information based on the desired $options - * - * @param string $file Absolute path to the file to analyze - * @param array $options TBT - * @return mixed - */ - public function analyze($file, $options = array()) { - if (!is_string($file)) { - return false; - } - - $matches = array(); - $MagicFileResource = new MagicFileResource($file); - foreach ($this->db['database'] as $format) { - $magic = $format[0]; - $match = $MagicFileResource->test($magic); - if ($match === false) { - continue; - } - $matches[] = $magic; - } - - return $matches; - } -} - -/** - * undocumented class - * - * @package cake.libs - */ -class MagicFileResource extends Object{ - -/** - * undocumented variable - * - * @var unknown - * @access public - */ - public $resource = null; - -/** - * undocumented variable - * - * @var unknown - * @access public - */ - public $offset = 0; - -/** - * undocumented function - * - * @param unknown $file - * @return void - */ - public function __construct($file) { - if (file_exists($file)) { - $this->resource = new File($file); - } else { - $this->resource = $file; - } - } - -/** - * undocumented function - * - * @param unknown $magic - * @return void - */ - public function test($magic) { - $offset = null; - $type = null; - $expected = null; - $comment = null; - if (isset($magic[0])) { - $offset = $magic[0]; - } - if (isset($magic[1])) { - $type = $magic[1]; - } - if (isset($magic[2])) { - $expected = $magic[2]; - } - if (isset($magic[3])) { - $comment = $magic[3]; - } - $val = $this->extract($offset, $type, $expected); - return $val == $expected; - } - -/** - * undocumented function - * - * @param unknown $type - * @param unknown $length - * @return void - */ - public function read($length = null) { - if (!is_object($this->resource)) { - return substr($this->resource, $this->offset, $length); - } - return $this->resource->read($length); - } - -/** - * undocumented function - * - * @param unknown $type - * @param unknown $expected - * @return void - */ - public function extract($offset, $type, $expected) { - switch ($type) { - case 'string': - $this->offset($offset); - $val = $this->read(strlen($expected)); - if ($val === $expected) { - return true; - } - break; - } - } - -/** - * undocumented function - * - * @param unknown $offset - * @param unknown $whence - * @return void - */ - public function offset($offset = null) { - if (is_null($offset)) { - if (!is_object($this->resource)) { - return $this->offset; - } - return $this->offset; - } - - if (!ctype_digit($offset)) { - return false; - } - if (is_object($this->resource)) { - $this->resource->offset($offset); - } else { - $this->offset = $offset; - } - } -} diff --git a/cake/libs/view/errors/missing_action.ctp b/cake/libs/view/errors/missing_action.ctp deleted file mode 100644 index 5b6fdb970..000000000 --- a/cake/libs/view/errors/missing_action.ctp +++ /dev/null @@ -1,44 +0,0 @@ - -

-

- : - ' . $action . '', '' . $controller . ''); ?> -

-

- : - ' . $controller . '::', '' . $action . '()', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?> -

-
-<?php
-class  extends AppController {
-
-
-	function  {
-
-	}
-
-}
-?>
-
-

- : - -

-element('exception_stack_trace'); ?> diff --git a/cake/libs/view/errors/missing_view.ctp b/cake/libs/view/errors/missing_view.ctp deleted file mode 100644 index 9d8c7cb91..000000000 --- a/cake/libs/view/errors/missing_view.ctp +++ /dev/null @@ -1,33 +0,0 @@ - -

-

- : - ' . Inflector::camelize($this->request->controller) . 'Controller::', '' . $this->request->action . '()'); ?> -

-

- : - -

-

- : - -

- -element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/pages/home.ctp b/cake/libs/view/pages/home.ctp deleted file mode 100644 index 400df888b..000000000 --- a/cake/libs/view/pages/home.ctp +++ /dev/null @@ -1,174 +0,0 @@ - -

- - 0): - Debugger::checkSecurityKeys(); -endif; -?> -

- '; - echo __('Your tmp directory is writable.'); - echo ''; - else: - echo ''; - echo __('Your tmp directory is NOT writable.'); - echo ''; - endif; - ?> -

-

- '; - echo __('The %s is being used for caching. To change the config edit APP/config/core.php ', ''. $settings['engine'] . 'Engine'); - echo ''; - else: - echo ''; - echo __('Your cache is NOT working. Please check the settings in APP/config/core.php'); - echo ''; - endif; - ?> -

-

- '; - echo __('Your database configuration file is present.'); - $filePresent = true; - echo ''; - else: - echo ''; - echo __('Your database configuration file is NOT present.'); - echo '
'; - echo __('Rename config/database.php.default to config/database.php'); - echo '
'; - endif; - ?> -

-'; - __('PCRE has not been compiled with Unicode support.'); - echo '
'; - __('Recompile PCRE with Unicode support by adding --enable-unicode-properties when configuring'); - echo '

'; - } -?> -getDataSource('default'); - } catch (Exception $e) { - $connected = false; - } -?> -

- isConnected()): - echo ''; - echo __('Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - echo __('Cake is NOT able to connect to the database.'); - echo ''; - endif; - ?> -

- -

-

- -To change its layout, create: APP/views/layouts/default.ctp.
-You can also add some CSS styles for your pages at: APP/webroot/css.'); -?> -

- -

-

- Html->link( - sprintf('%s %s', __('New'), __('CakePHP 1.3 Docs')), - 'http://book.cakephp.org/view/875/x1-3-Collection', - array('target' => '_blank', 'escape' => false) - ); - ?> -

-

- Html->link( - __('The 15 min Blog Tutorial'), - 'http://book.cakephp.org/view/1528/Blog', - array('target' => '_blank', 'escape' => false) - ); - ?> -

- -

-

- -

-

- -

- - diff --git a/cake/tests/cases/libs/all_libs.test.php b/cake/tests/cases/libs/all_libs.test.php deleted file mode 100644 index ba0388850..000000000 --- a/cake/tests/cases/libs/all_libs.test.php +++ /dev/null @@ -1,53 +0,0 @@ -addTestFile(CORE_TEST_CASES . DS . 'basics.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_session.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'debugger.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'file.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'folder.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'inflector.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'log' . DS . 'file_log.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'cake_log.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'class_registry.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'sanitize.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'set.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'string.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'validation.test.php'); - $suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'object_collection.test.php'); - return $suite; - } -} \ No newline at end of file diff --git a/cake/tests/cases/libs/all_tests.test.php b/cake/tests/cases/libs/all_tests.test.php deleted file mode 100644 index f7bdc72d3..000000000 --- a/cake/tests/cases/libs/all_tests.test.php +++ /dev/null @@ -1,61 +0,0 @@ -addTestFile($console . 'all_console_libs.test.php'); - $suite->addTestFile($console . 'all_shells.test.php'); - $suite->addTestFile($console . 'all_tasks.test.php'); - - $suite->addTestFile($path . 'all_behaviors.test.php'); - $suite->addTestFile($path . 'all_cache_engines.test.php'); - $suite->addTestFile($path . 'all_components.test.php'); - $suite->addTestFile($path . 'all_configure.test.php'); - $suite->addTestFile($path . 'all_controllers.test.php'); - $suite->addTestFile($path . 'all_database.test.php'); - $suite->addTestFile($path . 'all_error.test.php'); - $suite->addTestFile($path . 'all_helpers.test.php'); - $suite->addTestFile($path . 'all_libs.test.php'); - $suite->addTestFile($path . 'all_localization.test.php'); - $suite->addTestFile($path . 'all_model.test.php'); - $suite->addTestFile($path . 'all_routing.test.php'); - $suite->addTestFile($path . 'all_socket.test.php'); - $suite->addTestFile($path . 'all_test_suite.test.php');; - $suite->addTestFile($path . 'all_views.test.php'); - $suite->addTestFile($path . 'all_xml.test.php'); - return $suite; - } -} diff --git a/cake/tests/cases/libs/app.test.php b/cake/tests/cases/libs/app.test.php deleted file mode 100644 index 701f32f60..000000000 --- a/cake/tests/cases/libs/app.test.php +++ /dev/null @@ -1,568 +0,0 @@ -assertEqual($expected, $old); - - App::build(array('models' => array('/path/to/models/'))); - - $new = App::path('models'); - - $expected = array( - '/path/to/models/', - APP . 'models' . DS, - APP, - LIBS . 'model' . DS - ); - $this->assertEqual($expected, $new); - - App::build(); //reset defaults - $defaults = App::path('models'); - $this->assertEqual($old, $defaults); - } - -/** - * testBuildWithReset method - * - * @access public - * @return void - */ - function testBuildWithReset() { - $old = App::path('models'); - $expected = array( - APP . 'models' . DS, - APP, - LIBS . 'model' . DS - ); - $this->assertEqual($expected, $old); - - App::build(array('models' => array('/path/to/models/')), true); - - $new = App::path('models'); - - $expected = array( - '/path/to/models/' - ); - $this->assertEqual($expected, $new); - - App::build(); //reset defaults - $defaults = App::path('models'); - $this->assertEqual($old, $defaults); - } - -/** - * testCore method - * - * @access public - * @return void - */ - function testCore() { - $model = App::core('models'); - $this->assertEqual(array(LIBS . 'model' . DS), $model); - - $view = App::core('views'); - $this->assertEqual(array(LIBS . 'view' . DS), $view); - - $controller = App::core('controllers'); - $this->assertEqual(array(LIBS . 'controller' . DS), $controller); - - } - -/** - * testListObjects method - * - * @access public - * @return void - */ - function testListObjects() { - $result = App::objects('class', TEST_CAKE_CORE_INCLUDE_PATH . 'libs', false); - $this->assertTrue(in_array('Xml', $result)); - $this->assertTrue(in_array('Cache', $result)); - $this->assertTrue(in_array('HttpSocket', $result)); - - $result = App::objects('behavior', null, false); - $this->assertTrue(in_array('Tree', $result)); - - $result = App::objects('controller', null, false); - $this->assertTrue(in_array('Pages', $result)); - - $result = App::objects('component', null, false); - $this->assertTrue(in_array('Auth', $result)); - - $result = App::objects('view', null, false); - $this->assertTrue(in_array('Media', $result)); - - $result = App::objects('helper', null, false); - $this->assertTrue(in_array('Html', $result)); - - $result = App::objects('model', null, false); - $notExpected = array('AppModel', 'ModelBehavior', 'ConnectionManager', 'DbAcl', 'Model', 'CakeSchema'); - foreach ($notExpected as $class) { - $this->assertFalse(in_array($class, $result)); - } - - $result = App::objects('file'); - $this->assertFalse($result); - - $result = App::objects('file', 'non_existing_configure'); - $expected = array(); - $this->assertEqual($result, $expected); - - $result = App::objects('NonExistingType'); - $this->assertFalse($result); - - App::build(array( - 'plugins' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS - ) - )); - $result = App::objects('plugin', null, false); - $this->assertTrue(in_array('Cache', $result)); - $this->assertTrue(in_array('Log', $result)); - - App::build(); - } - -/** - * Tests listing objects within a plugin - * - * @return void - */ - function testListObjectsInPlugin() { - App::build(array( - 'models' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'models' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) - )); - - $oldCache = App::$models; - $result = App::objects('TestPlugin.model'); - $this->assertTrue(in_array('TestPluginPost', $result)); - $this->assertEquals($oldCache, App::$models); - - $result = App::objects('TestPlugin.behavior'); - $this->assertTrue(in_array('TestPluginPersisterOne', $result)); - - $result = App::objects('TestPlugin.helper'); - $expected = array('OtherHelper', 'PluggedHelper', 'TestPluginApp'); - $this->assertEquals($result, $expected); - - $result = App::objects('TestPlugin.component'); - $this->assertTrue(in_array('OtherComponent', $result)); - - $result = App::objects('TestPluginTwo.behavior'); - $this->assertEquals($result, array()); - - $result = App::objects('model', null, false); - $this->assertTrue(in_array('Comment', $result)); - $this->assertTrue(in_array('Post', $result)); - - App::build(); - } - -/** - * test that pluginPath can find paths for plugins. - * - * @return void - */ - function testPluginPath() { - App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) - )); - $path = App::pluginPath('test_plugin'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; - $this->assertEqual($path, $expected); - - $path = App::pluginPath('TestPlugin'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS; - $this->assertEqual($path, $expected); - - $path = App::pluginPath('TestPluginTwo'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS; - $this->assertEqual($path, $expected); - App::build(); - } - -/** - * test that pluginPath can find paths for plugins. - * - * @return void - */ - function testThemePath() { - App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS) - )); - $path = App::themePath('test_theme'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; - $this->assertEqual($path, $expected); - - $path = App::themePath('TestTheme'); - $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS; - $this->assertEqual($path, $expected); - - App::build(); - } - -/** - * testClassLoading method - * - * @access public - * @return void - */ - function testClassLoading() { - $file = App::import(); - $this->assertTrue($file); - - $file = App::import('Model', 'Model', false); - $this->assertTrue($file); - $this->assertTrue(class_exists('Model')); - - $file = App::import('Controller', 'Controller', false); - $this->assertTrue($file); - $this->assertTrue(class_exists('Controller')); - - $file = App::import('Component', 'Component', false); - $this->assertTrue($file); - $this->assertTrue(class_exists('Component')); - - $file = App::import('Shell', 'Shell', false); - $this->assertTrue($file); - $this->assertTrue(class_exists('Shell')); - - $file = App::import('Lib', 'config/PhpReader'); - $this->assertTrue($file); - $this->assertTrue(class_exists('PhpReader')); - - $file = App::import('Model', 'SomeRandomModelThatDoesNotExist', false); - $this->assertFalse($file); - - $file = App::import('Model', 'AppModel', false); - $this->assertTrue($file); - $this->assertTrue(class_exists('AppModel')); - - $file = App::import('WrongType', null, true, array(), ''); - $this->assertTrue($file); - - $file = App::import('Model', 'NonExistingPlugin.NonExistingModel', false); - $this->assertFalse($file); - - $file = App::import('Core', 'NonExistingPlugin.NonExistingModel', false); - $this->assertFalse($file); - - $file = App::import('Model', array('NonExistingPlugin.NonExistingModel'), false); - $this->assertFalse($file); - - $file = App::import('Core', array('NonExistingPlugin.NonExistingModel'), false); - $this->assertFalse($file); - - $file = App::import('Core', array('NonExistingPlugin.NonExistingModel.AnotherChild'), false); - $this->assertFalse($file); - - if (!class_exists('AppController')) { - $classes = array_flip(get_declared_classes()); - - $this->assertFalse(isset($classes['PagesController'])); - $this->assertFalse(isset($classes['AppController'])); - - $file = App::import('Controller', 'Pages'); - $this->assertTrue($file); - $this->assertTrue(class_exists('PagesController')); - - $classes = array_flip(get_declared_classes()); - - $this->assertTrue(isset($classes['PagesController'])); - $this->assertTrue(isset($classes['AppController'])); - - $file = App::import('Behavior', 'Containable'); - $this->assertTrue($file); - $this->assertTrue(class_exists('ContainableBehavior')); - - $file = App::import('Component', 'RequestHandler'); - $this->assertTrue($file); - $this->assertTrue(class_exists('RequestHandlerComponent')); - - $file = App::import('Helper', 'Form'); - $this->assertTrue($file); - $this->assertTrue(class_exists('FormHelper')); - - $file = App::import('Model', 'NonExistingModel'); - $this->assertFalse($file); - - $file = App::import('Datasource', 'DboSource'); - $this->assertTrue($file); - $this->assertTrue(class_exists('DboSource')); - } - App::build(); - } - -/** - * test import() with plugins - * - * @return void - */ - function testPluginImporting() { - App::build(array( - 'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS), - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) - )); - - $result = App::import('Controller', 'TestPlugin.Tests'); - $this->assertTrue($result); - $this->assertTrue(class_exists('TestPluginAppController')); - $this->assertTrue(class_exists('TestsController')); - - $result = App::import('Lib', 'TestPlugin.TestPluginLibrary'); - $this->assertTrue($result); - $this->assertTrue(class_exists('TestPluginLibrary')); - - $result = App::import('Lib', 'Library'); - $this->assertTrue($result); - $this->assertTrue(class_exists('Library')); - - $result = App::import('Helper', 'TestPlugin.OtherHelper'); - $this->assertTrue($result); - $this->assertTrue(class_exists('OtherHelperHelper')); - - $result = App::import('Helper', 'TestPlugin.TestPluginApp'); - $this->assertTrue($result); - $this->assertTrue(class_exists('TestPluginAppHelper')); - - $result = App::import('Datasource', 'TestPlugin.TestSource'); - $this->assertTrue($result); - $this->assertTrue(class_exists('TestSource')); - - App::build(); - } - -/** - * test that building helper paths actually works. - * - * @return void - * @link http://cakephp.lighthouseapp.com/projects/42648/tickets/410 - */ - function testImportingHelpersFromAlternatePaths() { - App::build(); - $this->assertFalse(class_exists('BananaHelper'), 'BananaHelper exists, cannot test importing it.'); - App::import('Helper', 'Banana'); - $this->assertFalse(class_exists('BananaHelper'), 'BananaHelper was not found because the path does not exist.'); - - App::build(array( - 'helpers' => array( - TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'helpers' . DS - ) - )); - App::build(array('vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH))); - $this->assertFalse(class_exists('BananaHelper'), 'BananaHelper exists, cannot test importing it.'); - App::import('Helper', 'Banana'); - $this->assertTrue(class_exists('BananaHelper'), 'BananaHelper was not loaded.'); - - App::build(); - } - -/** - * testFileLoading method - * - * @access public - * @return void - */ - function testFileLoading () { - $file = App::import('File', 'RealFile', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php'); - $this->assertTrue($file); - - $file = App::import('File', 'NoFile', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'cake' . DS . 'config.php'); - $this->assertFalse($file); - } - -/** - * testFileLoadingWithArray method - * - * @access public - * @return void - */ - function testFileLoadingWithArray() { - $type = array('type' => 'File', 'name' => 'SomeName', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . DS . 'config' . DS . 'config.php'); - $file = App::import($type); - $this->assertTrue($file); - - $type = array('type' => 'File', 'name' => 'NoFile', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'cake' . DS . 'config.php'); - $file = App::import($type); - $this->assertFalse($file); - } - -/** - * testFileLoadingReturnValue method - * - * @access public - * @return void - */ - function testFileLoadingReturnValue () { - $file = App::import('File', 'Name', false, array(), TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', true); - $this->assertTrue(!empty($file)); - - $this->assertTrue(isset($file['Cake.version'])); - - $type = array('type' => 'File', 'name' => 'OtherName', 'parent' => false, - 'file' => TEST_CAKE_CORE_INCLUDE_PATH . 'config' . DS . 'config.php', 'return' => true); - $file = App::import($type); - $this->assertTrue(!empty($file)); - - $this->assertTrue(isset($file['Cake.version'])); - } - -/** - * testLoadingWithSearch method - * - * @access public - * @return void - */ - function testLoadingWithSearch () { - $file = App::import('File', 'NewName', false, array(TEST_CAKE_CORE_INCLUDE_PATH ), 'config.php'); - $this->assertTrue($file); - - $file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php'); - $this->assertFalse($file); - } - -/** - * testLoadingWithSearchArray method - * - * @access public - * @return void - */ - function testLoadingWithSearchArray () { - $type = array('type' => 'File', 'name' => 'RandomName', 'parent' => false, 'file' => 'config.php', 'search' => array(TEST_CAKE_CORE_INCLUDE_PATH )); - $file = App::import($type); - $this->assertTrue($file); - - $type = array('type' => 'File', 'name' => 'AnotherRandomName', 'parent' => false, 'file' => 'config.php', 'search' => array(LIBS)); - $file = App::import($type); - $this->assertFalse($file); - } - -/** - * testMultipleLoading method - * - * @access public - * @return void - */ - function testMultipleLoading() { - if (class_exists('I18n', false) || class_exists('CakeSocket', false)) { - $this->markTestSkipped('Cannot test loading of classes that exist.'); - } - $toLoad = array('I18n', 'CakeSocket'); - - $classes = array_flip(get_declared_classes()); - $this->assertFalse(isset($classes['i18n'])); - $this->assertFalse(isset($classes['CakeSocket'])); - - $load = App::import($toLoad); - $this->assertTrue($load); - - $classes = array_flip(get_declared_classes()); - - - $this->assertTrue(isset($classes['I18n'])); - - $load = App::import(array('I18n', 'SomeNotFoundClass', 'CakeSocket')); - $this->assertFalse($load); - - $load = App::import($toLoad); - $this->assertTrue($load); - } - -/** - * This test only works if you have plugins/my_plugin set up. - * plugins/my_plugin/models/my_plugin.php and other_model.php - */ - -/* - function testMultipleLoadingByType() { - $classes = array_flip(get_declared_classes()); - $this->assertFalse(isset($classes['OtherPlugin'])); - $this->assertFalse(isset($classes['MyPlugin'])); - - - $load = App::import('Model', array('MyPlugin.OtherPlugin', 'MyPlugin.MyPlugin')); - $this->assertTrue($load); - - $classes = array_flip(get_declared_classes()); - $this->assertTrue(isset($classes['OtherPlugin'])); - $this->assertTrue(isset($classes['MyPlugin'])); - } -*/ - function testLoadingVendor() { - App::build(array( - 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS), - 'vendors' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors'. DS), - ), true); - - ob_start(); - $result = App::import('Vendor', 'TestPlugin.TestPluginAsset', array('ext' => 'css')); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'this is the test plugin asset css file'); - - ob_start(); - $result = App::import('Vendor', 'TestAsset', array('ext' => 'css')); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'this is the test asset css file'); - - $result = App::import('Vendor', 'TestPlugin.SamplePlugin'); - $this->assertTrue($result); - $this->assertTrue(class_exists('SamplePluginClassTestName')); - - $result = App::import('Vendor', 'ConfigureTestVendorSample'); - $this->assertTrue($result); - $this->assertTrue(class_exists('ConfigureTestVendorSample')); - - ob_start(); - $result = App::import('Vendor', 'SomeName', array('file' => 'some.name.php')); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'This is a file with dot in file name'); - - ob_start(); - $result = App::import('Vendor', 'TestHello', array('file' => 'Test'.DS.'hello.php')); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'This is the hello.php file in Test directory'); - - ob_start(); - $result = App::import('Vendor', 'MyTest', array('file' => 'Test'.DS.'MyTest.php')); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'This is the MyTest.php file'); - - ob_start(); - $result = App::import('Vendor', 'Welcome'); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'This is the welcome.php file in vendors directory'); - - ob_start(); - $result = App::import('Vendor', 'TestPlugin.Welcome'); - $text = ob_get_clean(); - $this->assertTrue($result); - $this->assertEqual($text, 'This is the welcome.php file in test_plugin/vendors directory'); - } -} diff --git a/cake/tests/cases/libs/magic_db.test.php b/cake/tests/cases/libs/magic_db.test.php deleted file mode 100644 index 80586925b..000000000 --- a/cake/tests/cases/libs/magic_db.test.php +++ /dev/null @@ -1,193 +0,0 @@ -Db = new MagicDb(); - } -/** - * MagicDb::analyze should properly detect the file type and output additional info as requested. - * - */ - public function testAnalyze() { - $r = $this->Db->read(MagicDbTestData::get('magic.db')); - $this->assertTrue($r === true); - - $r = $this->Db->analyze(array()); - $this->assertTrue($r === false); - - $r = $this->Db->analyze(WWW_ROOT.'img'.DS.'cake.icon.gif'); - // TODO: Check several serialized file samples for accurate detection - } -/** - * MagicDb::read should properly read MagicDb databases from .php-/.db-files and plain data arguments passed in and return false if the file wasn't found or - * if the readed data did not validate. - * - */ - public function testRead() { - $this->Db->db = array(); - - $r = $this->Db->read(true); - $this->assertTrue($r === false); - $r = $this->Db->read(5); - $this->assertTrue($r === false); - - $this->Db->db = array('a'); - $r = $this->Db->read(array('foo' => 'bar')); - $this->assertTrue($r === false); - $this->assertTrue($this->Db->db === array('a')); - - $magicDb = array('header' => array(), 'database' => array()); - $r = $this->Db->read($magicDb); - $this->assertTrue($r === true); - $this->assertTrue($this->Db->db === $magicDb); - - // @TODO: Test parsing an actual magic.db file - - $r = $this->Db->read('does-not-exist.db'); - $this->assertTrue($r === false); - $this->assertTrue($this->Db->db === $magicDb); - - if (file_exists(VENDORS.'magic.php')) { - $r = $this->Db->read(VENDORS.'magic.php'); - $this->assertTrue($r === true); - $this->assertTrue($this->Db->db === array('header' => array(), 'database' => array())); - } - - $r = $this->Db->read(MagicDbTestData::get('magic.snippet.db')); - $this->assertTrue($r === true); - } -/** - * MagicDb::toArray should either return the MagicDb::db property, or the parsed array data if a magic.db dump is passed in as the first argument - * - */ - public function testToArray() { - $this->Db->db = array(); - - $r = $this->Db->toArray(); - $this->assertTrue($r === array()); - $this->Db->db = array('foo' => 'bar'); - $r = $this->Db->toArray(); - $this->assertTrue($r === array('foo' => 'bar')); - - $r = $this->Db->toArray(array('yeah')); - $this->assertTrue($r === array('yeah')); - - $r = $this->Db->toArray("# FILE_ID DB\r\n# Date:2009-10-10\r\n# Source:xxx.php"); - $this->assertTrue($r === array()); - - $r = $this->Db->toArray('foo'); - $this->assertTrue($r === array()); - - $r = $this->Db->toArray(MagicDbTestData::get('magic.snippet.db')); - $this->assertTrue($r === MagicDbTestData::get('magic.snippet.db.result')); - } -/** - * The MagicDb::validates function should return if the array passed to it or the local db property contains a valid MagicDb record set - * - */ - public function testValidates() { - $r = $this->Db->validates(array()); - $this->assertTrue($r === false); - - $r = $this->Db->validates(array('header' => true, 'database' => true)); - $this->assertTrue($r === false); - $magicDb = array('header' => array(), 'database' => array()); - $r = $this->Db->validates($magicDb); - $this->assertTrue($r === true); - - $this->Db->db = array(); - $r = $this->Db->validates(); - $this->assertTrue($r === false); - - $this->Db->db = $magicDb; - $r = $this->Db->validates(); - $this->assertTrue($r === true); - } -} -/** - * Test data holding object for MagicDb tests - * - * @package cake.tests.cases.libs - */ -/** - * MagicDbTestData class - * - * @package cake.tests.cases.libs - */ -class MagicDbTestData extends Object { -/** - * Base64 encoded data - * - * @var array - * @access public - */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IgZGF0YWJhc2UNCg0KDQojIENSQzMyOjhCQzNCQTQ2DQo=' - ); -/** - * Returns the test data for a given key - * - * @param string $key - */ - public function get($key) { -/** - * data property - * - * @var array - * @access public - */ - static $data = array(); - - if (empty($data)) { - $vars = get_class_vars(__CLASS__); - foreach ($vars['data'] as $k => $v) { - $data[$k] = base64_decode($v); - if (preg_match('/^[ais]:[0-9]+/', $data[$k])) { - $data[$k] = unserialize($data[$k]); - } - } - } - - if (!isset($data[$key])) { - return false; - } - return $data[$key]; - } -} diff --git a/cake/tests/test_app/models/datasources/test/test_local_driver.php b/cake/tests/test_app/models/datasources/test/test_local_driver.php deleted file mode 100644 index e483cb303..000000000 --- a/cake/tests/test_app/models/datasources/test/test_local_driver.php +++ /dev/null @@ -1,5 +0,0 @@ -Sweet, "Test App" got Baked by CakePHP! -

-'; - echo __('Your tmp directory is writable.'); - echo ''; - else: - echo ''; - echo __('Your tmp directory is NOT writable.'); - echo ''; - endif; -?> -

-

-'; - echo __('The %s is being used for caching. To change the config edit APP/config/core.php ', ''. $settings['engine'] . 'Engine'); - echo ''; - else: - echo ''; - echo __('Your cache is NOT working. Please check the settings in APP/config/core.php'); - echo ''; - endif; -?> -

-

-'; - echo __('Your database configuration file is present.'); - $filePresent = true; - echo ''; - else: - echo ''; - echo __('Your database configuration file is NOT present.'); - echo '
'; - echo __('Rename config/database.php.default to config/database.php'); - echo '
'; - endif; -?> -

- -

-'; - echo __('Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - echo __('Cake is NOT able to connect to the database.'); - echo ''; - endif; -?> -

- -

-

-', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css'); -?> -

\ No newline at end of file diff --git a/cake/tests/test_app/views/posts/test_nocache_tags.ctp b/cake/tests/test_app/views/posts/test_nocache_tags.ctp deleted file mode 100644 index 745ef4ad9..000000000 --- a/cake/tests/test_app/views/posts/test_nocache_tags.ctp +++ /dev/null @@ -1,143 +0,0 @@ - -

- - - - - -

-

- - ' . $settings['engine']; - echo __(' is being used to cache, to change this edit config/core.php '); - echo '

'; - - echo 'Settings: '; - - else: - echo __('NOT working.'); - echo '
'; - if (is_writable(TMP)): - echo __('Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly'); - endif; - endif; - ?> - -

-

- - '; - echo __('Rename config/database.php.default to config/database.php'); - endif; - ?> - -

-getDataSource('default'); -?> -

- - isConnected()): - __(' is able to '); - else: - __(' is NOT able to '); - endif; - __('connect to the database.'); - ?> - -

- -

- -

-

-
-
-
- -

-

-

-
-
- -

-

-

- -

-

- -

- \ No newline at end of file diff --git a/cake/tests/test_app/views/scaffolds/empty b/cake/tests/test_app/views/scaffolds/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/cake/libs/cache.php b/lib/Cake/Cache/Cache.php similarity index 93% rename from cake/libs/cache.php rename to lib/Cake/Cache/Cache.php index 0478d3bf4..2ffdeb007 100644 --- a/cake/libs/cache.php +++ b/lib/Cake/Cache/Cache.php @@ -18,14 +18,16 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Inflector', 'Utility'); + /** * Cache provides a consistent interface to Caching in your application. It allows you - * to use several different Cache engines, without coupling your application to a specific - * implementation. It also allows you to change out cache storage or configuration without effecting + * to use several different Cache engines, without coupling your application to a specific + * implementation. It also allows you to change out cache storage or configuration without effecting * the rest of your application. * - * You can configure Cache engines in your application's `bootstrap.php` file. A sample configuration would - * be + * You can configure Cache engines in your application's `bootstrap.php` file. A sample configuration would + * be * * {{{ * Cache::config('shared', array( @@ -35,7 +37,7 @@ * }}} * * This would configure an APC cache engine to the 'shared' alias. You could then read and write - * to that cache alias by using it for the `$config` parameter in the various Cache methods. In + * to that cache alias by using it for the `$config` parameter in the various Cache methods. In * general all Cache operations are supported by all cache engines. However, Cache::increment() and * Cache::decrement() are not supported by File caching. * @@ -148,14 +150,15 @@ class Cache { protected static function _buildEngine($name) { $config = self::$_config[$name]; - list($plugin, $class) = pluginSplit($config['engine']); + list($plugin, $class) = pluginSplit($config['engine'], true); $cacheClass = $class . 'Engine'; - if (!class_exists($cacheClass) && self::_loadEngine($class, $plugin) === false) { + App::uses($cacheClass, $plugin . 'Cache/Engine'); + if (!class_exists($cacheClass)) { return false; } $cacheClass = $class . 'Engine'; if (!is_subclass_of($cacheClass, 'CacheEngine')) { - throw new CacheException(__('Cache engines must use CacheEngine as a base class.')); + throw new CacheException(__d('cake_dev', 'Cache engines must use CacheEngine as a base class.')); } self::$_engines[$name] = new $cacheClass(); if (self::$_engines[$name]->init($config)) { @@ -192,35 +195,15 @@ class Cache { return true; } -/** - * Tries to find and include a file for a cache engine and returns object instance - * - * @param $name Name of the engine (without 'Engine') - * @return mixed $engine object or null - */ - protected static function _loadEngine($name, $plugin = null) { - if ($plugin) { - return App::import('Lib', $plugin . '.cache' . DS . $name, false); - } else { - $core = App::core(); - $path = $core['libs'][0] . 'cache' . DS . strtolower($name) . '.php'; - if (file_exists($path)) { - require $path; - return true; - } - return App::import('Lib', 'cache' . DS . $name, false); - } - } - /** * Temporarily change the settings on a cache config. The settings will persist for the next write - * operation (write, decrement, increment, clear). Any reads that are done before the write, will - * use the modified settings. If `$settings` is empty, the settings will be reset to the + * operation (write, decrement, increment, clear). Any reads that are done before the write, will + * use the modified settings. If `$settings` is empty, the settings will be reset to the * original configuration. * * Can be called with 2 or 3 parameters. To set multiple values at once. * - * `Cache::set(array('duration' => '+30 minutes'), 'my_config');` + * `Cache::set(array('duration' => '+30 minutes'), 'my_config');` * * Or to set one value. * @@ -315,7 +298,7 @@ class Cache { self::set(null, $config); if ($success === false && $value !== '') { trigger_error( - __("%s cache was unable to write '%s' to cache", $config, $key), + __d('cake_dev', "%s cache was unable to write '%s' to cache", $config, $key), E_USER_WARNING ); } @@ -389,7 +372,7 @@ class Cache { * * @param string $key Identifier for the data * @param integer $offset How much to substract - * @param string $config Optional string configuration name. Defaults to 'default' + * @param string $config Optional string configuration name. Defaults to 'default' * @return mixed new value, or false if the data doesn't exist, is not integer, * or if there was an error fetching it */ diff --git a/cake/libs/cache/apc.php b/lib/Cake/Cache/Engine/ApcEngine.php similarity index 100% rename from cake/libs/cache/apc.php rename to lib/Cake/Cache/Engine/ApcEngine.php diff --git a/cake/libs/cache/file.php b/lib/Cake/Cache/Engine/FileEngine.php similarity index 96% rename from cake/libs/cache/file.php rename to lib/Cake/Cache/Engine/FileEngine.php index f6db44d09..fd6286b9a 100644 --- a/cake/libs/cache/file.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -37,7 +37,7 @@ class FileEngine extends CacheEngine { /** * Settings - * + * * - path = absolute path to cache directory, default => CACHE * - prefix = string prefix for filename, default => cake_ * - lock = enable file locking on write, default => false @@ -162,7 +162,7 @@ class FileEngine extends CacheEngine { if ($cachetime !== false && ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime)) { return false; } - + $data = ''; $this->_File->next(); while ($this->_File->valid()) { @@ -251,7 +251,7 @@ class FileEngine extends CacheEngine { * @throws CacheException */ public function decrement($key, $offset = 1) { - throw new CacheException(__('Files cannot be atomically decremented.')); + throw new CacheException(__d('cake_dev', 'Files cannot be atomically decremented.')); } /** @@ -261,7 +261,7 @@ class FileEngine extends CacheEngine { * @throws CacheException */ public function increment($key, $offset = 1) { - throw new CacheException(__('Files cannot be atomically incremented.')); + throw new CacheException(__d('cake_dev', 'Files cannot be atomically incremented.')); } /** @@ -297,9 +297,9 @@ class FileEngine extends CacheEngine { $dir = new SplFileInfo($this->settings['path']); if ($this->_init && !($dir->isDir() && $dir->isWritable())) { $this->_init = false; - trigger_error(__('%s is not writable', $this->settings['path']), E_USER_WARNING); + trigger_error(__d('cake_dev', '%s is not writable', $this->settings['path']), E_USER_WARNING); return false; } return true; } -} +} \ No newline at end of file diff --git a/cake/libs/cache/memcache.php b/lib/Cake/Cache/Engine/MemcacheEngine.php similarity index 94% rename from cake/libs/cache/memcache.php rename to lib/Cake/Cache/Engine/MemcacheEngine.php index 012eceba0..7b9aa5523 100644 --- a/cake/libs/cache/memcache.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -19,7 +19,7 @@ */ /** - * Memcache storage engine for cache. Memcache has some limitations in the amount of + * Memcache storage engine for cache. Memcache has some limitations in the amount of * control you have over expire times far in the future. See MemcacheEngine::write() for * more information. * @@ -61,8 +61,8 @@ class MemcacheEngine extends CacheEngine { return false; } parent::init(array_merge(array( - 'engine'=> 'Memcache', - 'prefix' => Inflector::slug(APP_DIR) . '_', + 'engine'=> 'Memcache', + 'prefix' => Inflector::slug(APP_DIR) . '_', 'servers' => array('127.0.0.1'), 'compress'=> false ), $settings) @@ -115,7 +115,7 @@ class MemcacheEngine extends CacheEngine { /** * Write data for key into cache. When using memcache as your cache engine - * remember that the Memcache pecl extension does not support cache expiry times greater + * remember that the Memcache pecl extension does not support cache expiry times greater * than 30 days in the future. Any duration greater than 30 days will be treated as never expiring. * * @param string $key Identifier for the data @@ -153,7 +153,7 @@ class MemcacheEngine extends CacheEngine { public function increment($key, $offset = 1) { if ($this->settings['compress']) { throw new CacheException( - __('Method increment() not implemented for compressed cache in %s', __CLASS__) + __d('cake_dev', 'Method increment() not implemented for compressed cache in %s', __CLASS__) ); } return $this->_Memcache->increment($key, $offset); @@ -171,7 +171,7 @@ class MemcacheEngine extends CacheEngine { public function decrement($key, $offset = 1) { if ($this->settings['compress']) { throw new CacheException( - __('Method decrement() not implemented for compressed cache in %s', __CLASS__) + __d('cake_dev', 'Method decrement() not implemented for compressed cache in %s', __CLASS__) ); } return $this->_Memcache->decrement($key, $offset); @@ -212,4 +212,4 @@ class MemcacheEngine extends CacheEngine { } return true; } -} +} \ No newline at end of file diff --git a/cake/libs/cache/xcache.php b/lib/Cake/Cache/Engine/XcacheEngine.php similarity index 100% rename from cake/libs/cache/xcache.php rename to lib/Cake/Cache/Engine/XcacheEngine.php diff --git a/cake/libs/config/ini_reader.php b/lib/Cake/Configure/IniReader.php similarity index 95% rename from cake/libs/config/ini_reader.php rename to lib/Cake/Configure/IniReader.php index 7ab9694ce..d4eb8172d 100644 --- a/cake/libs/config/ini_reader.php +++ b/lib/Cake/Configure/IniReader.php @@ -27,7 +27,7 @@ * you to create nested arrays structures in an ini config file. For example: * * `db.password = secret` would turn into `array('db' => array('password' => 'secret'))` - * + * * You can nest properties as deeply as needed using .'s. IniReader also manipulates * how the special ini values of 'yes', 'no', 'on', 'off', 'null' are handled. * These values will be converted to their boolean equivalents. @@ -74,7 +74,7 @@ class IniReader implements ConfigReaderInterface { if (!file_exists($filename)) { $filename .= '.ini'; if (!file_exists($filename)) { - throw new ConfigureException(__('Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename)); + throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($filename, 0, -4), $filename)); } } $contents = parse_ini_file($filename, true); diff --git a/cake/libs/config/php_reader.php b/lib/Cake/Configure/PhpReader.php similarity index 87% rename from cake/libs/config/php_reader.php rename to lib/Cake/Configure/PhpReader.php index acd0f94df..54f99dae1 100644 --- a/cake/libs/config/php_reader.php +++ b/lib/Cake/Configure/PhpReader.php @@ -18,7 +18,7 @@ */ /** - * PHP Reader allows Configure to load configuration values from + * PHP Reader allows Configure to load configuration values from * files containing simple PHP arrays. * * @package cake.libs.config @@ -55,13 +55,13 @@ class PhpReader implements ConfigReaderInterface { */ public function read($key) { if (strpos($key, '..') !== false) { - throw new ConfigureException(__('Cannot load configuration files with ../ in them.')); + throw new ConfigureException(__d('cake_dev', 'Cannot load configuration files with ../ in them.')); } if (substr($key, -4) === '.php') { $key = substr($key, 0, -4); } list($plugin, $key) = pluginSplit($key); - + if ($plugin) { $file = App::pluginPath($plugin) . 'config' . DS . $key; } else { @@ -70,13 +70,13 @@ class PhpReader implements ConfigReaderInterface { if (!file_exists($file)) { $file .= '.php'; if (!file_exists($file)) { - throw new ConfigureException(__('Could not load configuration files: %s or %s', substr($file, 0, -4), $file)); + throw new ConfigureException(__d('cake_dev', 'Could not load configuration files: %s or %s', substr($file, 0, -4), $file)); } } include $file; if (!isset($config)) { throw new ConfigureException( - sprintf(__('No variable $config found in %s.php'), $file) + sprintf(__d('cake_dev', 'No variable $config found in %s.php'), $file) ); } return $config; diff --git a/cake/console/shells/app_shell.php b/lib/Cake/Console/AppShell.php similarity index 93% rename from cake/console/shells/app_shell.php rename to lib/Cake/Console/AppShell.php index a624a31ad..ca3abc8ed 100644 --- a/cake/console/shells/app_shell.php +++ b/lib/Cake/Console/AppShell.php @@ -19,7 +19,7 @@ /** * This is a placeholder class. - * Create the same file in app/console/shells/app_shell.php + * Create the same file in app/console/shells/AppShell.php * * Add your application-wide methods in the class below, your shells * will inherit them. diff --git a/cake/console/shells/acl.php b/lib/Cake/Console/Command/AclShell.php similarity index 63% rename from cake/console/shells/acl.php rename to lib/Cake/Console/Command/AclShell.php index b4d458ba7..29312eaef 100644 --- a/cake/console/shells/acl.php +++ b/lib/Cake/Console/Command/AclShell.php @@ -16,8 +16,8 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'Acl'); -App::import('Model', 'DbAcl'); +App::uses('AclComponent', 'Controller/Component'); +App::uses('DbAcl', 'Model'); /** * Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode @@ -71,12 +71,12 @@ class AclShell extends Shell { if (!in_array(Configure::read('Acl.classname'), array('DbAcl', 'DB_ACL'))) { $out = "--------------------------------------------------\n"; - $out .= __('Error: Your current Cake configuration is set to') . "\n"; - $out .= __('an ACL implementation other than DB. Please change') . "\n"; - $out .= __('your core config to reflect your decision to use') . "\n"; - $out .= __('DbAcl before attempting to use this script') . ".\n"; + $out .= __d('cake_console', 'Error: Your current Cake configuration is set to') . "\n"; + $out .= __d('cake_console', 'an ACL implementation other than DB. Please change') . "\n"; + $out .= __d('cake_console', 'your core config to reflect your decision to use') . "\n"; + $out .= __d('cake_console', 'DbAcl before attempting to use this script') . ".\n"; $out .= "--------------------------------------------------\n"; - $out .= __('Current ACL Classname: %s', Configure::read('Acl.classname')) . "\n"; + $out .= __d('cake_console', 'Current ACL Classname: %s', Configure::read('Acl.classname')) . "\n"; $out .= "--------------------------------------------------\n"; $this->err($out); $this->_stop(); @@ -84,7 +84,7 @@ class AclShell extends Shell { if ($this->command) { if (!config('database')) { - $this->out(__('Your database configuration was not found. Take a moment to create one.'), true); + $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'), true); $this->args = null; return $this->DbConfig->execute(); } @@ -127,15 +127,15 @@ class AclShell extends Shell { if (is_string($data) && $data != '/') { $data = array('alias' => $data); } elseif (is_string($data)) { - $this->error(__('/ can not be used as an alias!') . __(" / is the root, please supply a sub alias")); + $this->error(__d('cake_console', '/ can not be used as an alias!') . __d('cake_console', " / is the root, please supply a sub alias")); } $data['parent_id'] = $parent; $this->Acl->{$class}->create(); if ($this->Acl->{$class}->save($data)) { - $this->out(__("New %s '%s' created.", $class, $this->args[2]), 2); + $this->out(__d('cake_console', "New %s '%s' created.", $class, $this->args[2]), 2); } else { - $this->err(__("There was a problem creating a new %s '%s'.", $class, $this->args[2])); + $this->err(__d('cake_console', "There was a problem creating a new %s '%s'.", $class, $this->args[2])); } } @@ -150,9 +150,9 @@ class AclShell extends Shell { $nodeId = $this->_getNodeId($class, $identifier); if (!$this->Acl->{$class}->delete($nodeId)) { - $this->error(__('Node Not Deleted') . __('There was an error deleting the %s. Check that the node exists', $class) . ".\n"); + $this->error(__d('cake_console', 'Node Not Deleted') . __d('cake_console', 'There was an error deleting the %s. Check that the node exists', $class) . ".\n"); } - $this->out(__('%s deleted.', $class), 2); + $this->out(__d('cake_console', '%s deleted.', $class), 2); } /** @@ -172,9 +172,9 @@ class AclShell extends Shell { ); $this->Acl->{$class}->create(); if (!$this->Acl->{$class}->save($data)) { - $this->out(__('Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.'), true); + $this->out(__d('cake_console', 'Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.'), true); } else { - $this->out(__('Node parent set to %s', $this->args[2]) . "\n", true); + $this->out(__d('cake_console', 'Node parent set to %s', $this->args[2]) . "\n", true); } } @@ -191,11 +191,11 @@ class AclShell extends Shell { if (empty($nodes)) { $this->error( - __("Supplied Node '%s' not found", $this->args[1]), - __('No tree returned.') + __d('cake_console', "Supplied Node '%s' not found", $this->args[1]), + __d('cake_console', 'No tree returned.') ); } - $this->out(__('Path:')); + $this->out(__d('cake_console', 'Path:')); $this->hr(); for ($i = 0; $i < count($nodes); $i++) { $this->_outputNode($class, $nodes[$i], $i); @@ -228,9 +228,9 @@ class AclShell extends Shell { extract($this->__getParams()); if ($this->Acl->check($aro, $aco, $action)) { - $this->out(__('%s is allowed.', $aroName), true); + $this->out(__d('cake_console', '%s is allowed.', $aroName), true); } else { - $this->out(__('%s is not allowed.', $aroName), true); + $this->out(__d('cake_console', '%s is not allowed.', $aroName), true); } } @@ -242,9 +242,9 @@ class AclShell extends Shell { extract($this->__getParams()); if ($this->Acl->allow($aro, $aco, $action)) { - $this->out(__('Permission granted.'), true); + $this->out(__d('cake_console', 'Permission granted.'), true); } else { - $this->out(__('Permission was not granted.'), true); + $this->out(__d('cake_console', 'Permission was not granted.'), true); } } @@ -256,9 +256,9 @@ class AclShell extends Shell { extract($this->__getParams()); if ($this->Acl->deny($aro, $aco, $action)) { - $this->out(__('Permission denied.'), true); + $this->out(__d('cake_console', 'Permission denied.'), true); } else { - $this->out(__('Permission was not denied.'), true); + $this->out(__d('cake_console', 'Permission was not denied.'), true); } } @@ -270,9 +270,9 @@ class AclShell extends Shell { extract($this->__getParams()); if ($this->Acl->inherit($aro, $aco, $action)) { - $this->out(__('Permission inherited.'), true); + $this->out(__d('cake_console', 'Permission inherited.'), true); } else { - $this->out(__('Permission was not inherited.'), true); + $this->out(__d('cake_console', 'Permission was not inherited.'), true); } } @@ -303,9 +303,9 @@ class AclShell extends Shell { if (empty($nodes)) { if (isset($this->args[1])) { - $this->error(__('%s not found', $this->args[1]), __('No tree returned.')); + $this->error(__d('cake_console', '%s not found', $this->args[1]), __d('cake_console', 'No tree returned.')); } elseif (isset($this->args[0])) { - $this->error(__('%s not found', $this->args[0]), __('No tree returned.')); + $this->error(__d('cake_console', '%s not found', $this->args[0]), __d('cake_console', 'No tree returned.')); } } $this->out($class . " tree:"); @@ -354,140 +354,140 @@ class AclShell extends Shell { $type = array( 'choices' => array('aro', 'aco'), 'required' => true, - 'help' => __('Type of node to create.') + 'help' => __d('cake_console', 'Type of node to create.') ); $parser->description('A console tool for managing the DbAcl') ->addSubcommand('create', array( - 'help' => __('Create a new ACL node'), + 'help' => __d('cake_console', 'Create a new ACL node'), 'parser' => array( - 'description' => __('Creates a new ACL object under the parent'), + 'description' => __d('cake_console', 'Creates a new ACL object under the parent'), 'arguments' => array( 'type' => $type, 'parent' => array( - 'help' => __('The node selector for the parent.'), + 'help' => __d('cake_console', 'The node selector for the parent.'), 'required' => true ), 'alias' => array( - 'help' => __('The alias to use for the newly created node.'), + 'help' => __d('cake_console', 'The alias to use for the newly created node.'), 'required' => true ) ) ) ))->addSubcommand('delete', array( - 'help' => __('Deletes the ACL object with the given reference'), + 'help' => __d('cake_console', 'Deletes the ACL object with the given reference'), 'parser' => array( - 'description' => __('Delete an ACL node.'), + 'description' => __d('cake_console', 'Delete an ACL node.'), 'arguments' => array( 'type' => $type, 'node' => array( - 'help' => __('The node identifier to delete.'), + 'help' => __d('cake_console', 'The node identifier to delete.'), 'required' => true, ) ) ) ))->addSubcommand('setparent', array( - 'help' => __('Moves the ACL node under a new parent.'), + 'help' => __d('cake_console', 'Moves the ACL node under a new parent.'), 'parser' => array( - 'description' => __('Moves the ACL object specified by beneath '), + 'description' => __d('cake_console', 'Moves the ACL object specified by beneath '), 'arguments' => array( 'type' => $type, 'node' => array( - 'help' => __('The node to move'), + 'help' => __d('cake_console', 'The node to move'), 'required' => true, ), 'parent' => array( - 'help' => __('The new parent for .'), + 'help' => __d('cake_console', 'The new parent for .'), 'required' => true ) ) ) ))->addSubcommand('getpath', array( - 'help' => __('Print out the path to an ACL node.'), + 'help' => __d('cake_console', 'Print out the path to an ACL node.'), 'parser' => array( 'description' => array( - __("Returns the path to the ACL object specified by ."), - __("This command is useful in determining the inhertiance of permissions"), - __("for a certain object in the tree.") + __d('cake_console', "Returns the path to the ACL object specified by ."), + __d('cake_console', "This command is useful in determining the inhertiance of permissions"), + __d('cake_console', "for a certain object in the tree.") ), 'arguments' => array( 'type' => $type, 'node' => array( - 'help' => __('The node to get the path of'), + 'help' => __d('cake_console', 'The node to get the path of'), 'required' => true, ) ) ) ))->addSubcommand('check', array( - 'help' => __('Check the permissions between an ACO and ARO.'), + 'help' => __d('cake_console', 'Check the permissions between an ACO and ARO.'), 'parser' => array( 'description' => array( - __("Use this command to grant ACL permissions. Once executed, the ARO "), - __("specified (and its children, if any) will have ALLOW access to the"), - __("specified ACO action (and the ACO's children, if any).") + __d('cake_console', "Use this command to grant ACL permissions. Once executed, the ARO "), + __d('cake_console', "specified (and its children, if any) will have ALLOW access to the"), + __d('cake_console', "specified ACO action (and the ACO's children, if any).") ), 'arguments' => array( - 'aro' => array('help' => __('ARO to check.'), 'required' => true), - 'aco' => array('help' => __('ACO to check.'), 'required' => true), - 'action' => array('help' => __('Action to check'), 'default' => 'all') + 'aro' => array('help' => __d('cake_console', 'ARO to check.'), 'required' => true), + 'aco' => array('help' => __d('cake_console', 'ACO to check.'), 'required' => true), + 'action' => array('help' => __d('cake_console', 'Action to check'), 'default' => 'all') ) ) ))->addSubcommand('grant', array( - 'help' => __('Grant an ARO permissions to an ACO.'), + 'help' => __d('cake_console', 'Grant an ARO permissions to an ACO.'), 'parser' => array( 'description' => array( - __("Use this command to grant ACL permissions. Once executed, the ARO"), - __("specified (and its children, if any) will have ALLOW access to the"), - __("specified ACO action (and the ACO's children, if any).") + __d('cake_console', "Use this command to grant ACL permissions. Once executed, the ARO"), + __d('cake_console', "specified (and its children, if any) will have ALLOW access to the"), + __d('cake_console', "specified ACO action (and the ACO's children, if any).") ), 'arguments' => array( - 'aro' => array('help' => __('ARO to grant permission to.'), 'required' => true), - 'aco' => array('help' => __('ACO to grant access to.'), 'required' => true), - 'action' => array('help' => __('Action to grant'), 'default' => 'all') + 'aro' => array('help' => __d('cake_console', 'ARO to grant permission to.'), 'required' => true), + 'aco' => array('help' => __d('cake_console', 'ACO to grant access to.'), 'required' => true), + 'action' => array('help' => __d('cake_console', 'Action to grant'), 'default' => 'all') ) ) ))->addSubcommand('deny', array( - 'help' => __('Deny an ARO permissions to an ACO.'), + 'help' => __d('cake_console', 'Deny an ARO permissions to an ACO.'), 'parser' => array( 'description' => array( - __("Use this command to deny ACL permissions. Once executed, the ARO"), - __("specified (and its children, if any) will have DENY access to the"), - __("specified ACO action (and the ACO's children, if any).") + __d('cake_console', "Use this command to deny ACL permissions. Once executed, the ARO"), + __d('cake_console', "specified (and its children, if any) will have DENY access to the"), + __d('cake_console', "specified ACO action (and the ACO's children, if any).") ), 'arguments' => array( - 'aro' => array('help' => __('ARO to deny.'), 'required' => true), - 'aco' => array('help' => __('ACO to deny.'), 'required' => true), - 'action' => array('help' => __('Action to deny'), 'default' => 'all') + 'aro' => array('help' => __d('cake_console', 'ARO to deny.'), 'required' => true), + 'aco' => array('help' => __d('cake_console', 'ACO to deny.'), 'required' => true), + 'action' => array('help' => __d('cake_console', 'Action to deny'), 'default' => 'all') ) ) ))->addSubcommand('inherit', array( - 'help' => __('Inherit an ARO\'s parent permissions.'), + 'help' => __d('cake_console', 'Inherit an ARO\'s parent permissions.'), 'parser' => array( 'description' => array( - __("Use this command to force a child ARO object to inherit its"), - __("permissions settings from its parent.") + __d('cake_console', "Use this command to force a child ARO object to inherit its"), + __d('cake_console', "permissions settings from its parent.") ), 'arguments' => array( - 'aro' => array('help' => __('ARO to have permisssions inherit.'), 'required' => true), - 'aco' => array('help' => __('ACO to inherit permissions on.'), 'required' => true), - 'action' => array('help' => __('Action to inherit'), 'default' => 'all') + 'aro' => array('help' => __d('cake_console', 'ARO to have permisssions inherit.'), 'required' => true), + 'aco' => array('help' => __d('cake_console', 'ACO to inherit permissions on.'), 'required' => true), + 'action' => array('help' => __d('cake_console', 'Action to inherit'), 'default' => 'all') ) ) ))->addSubcommand('view', array( - 'help' => __('View a tree or a single node\'s subtree.'), + 'help' => __d('cake_console', 'View a tree or a single node\'s subtree.'), 'parser' => array( 'description' => array( - __("The view command will return the ARO or ACO tree."), - __("The optional node parameter allows you to return"), - __("only a portion of the requested tree.") + __d('cake_console', "The view command will return the ARO or ACO tree."), + __d('cake_console', "The optional node parameter allows you to return"), + __d('cake_console', "only a portion of the requested tree.") ), 'arguments' => array( 'type' => $type, - 'node' => array('help' => __('The optional node to view the subtree of.')) + 'node' => array('help' => __d('cake_console', 'The optional node to view the subtree of.')) ) ) ))->addSubcommand('initdb', array( - 'help' => __('Initialize the DbAcl tables. Uses this command : cake schema run create DbAcl') + 'help' => __d('cake_console', 'Initialize the DbAcl tables. Uses this command : cake schema run create DbAcl') ))->epilog( array( 'Node and parent arguments can be in one of the following formats:', @@ -520,7 +520,7 @@ class AclShell extends Shell { $conditions = array($class . '.' . $key => $this->args[1]); $possibility = $this->Acl->{$class}->find('all', compact('conditions')); if (empty($possibility)) { - $this->error(__('%s not found', $this->args[1]), __('No tree returned.')); + $this->error(__d('cake_console', '%s not found', $this->args[1]), __d('cake_console', 'No tree returned.')); } return $possibility; } @@ -556,7 +556,7 @@ class AclShell extends Shell { if (is_array($identifier)) { $identifier = var_export($identifier, true); } - $this->error(__('Could not find node using reference "%s"', $identifier)); + $this->error(__d('cake_console', 'Could not find node using reference "%s"', $identifier)); } return Set::extract($node, "0.{$class}.id"); } diff --git a/cake/console/shells/api.php b/lib/Cake/Console/Command/ApiShell.php similarity index 83% rename from cake/console/shells/api.php rename to lib/Cake/Console/Command/ApiShell.php index 05cf326b8..d37b6acd0 100644 --- a/cake/console/shells/api.php +++ b/lib/Cake/Console/Command/ApiShell.php @@ -18,7 +18,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * API shell to show method signatures of CakePHP core classes. @@ -41,13 +41,13 @@ class ApiShell extends Shell { */ public function initialize() { $this->paths = array_merge($this->paths, array( - 'behavior' => LIBS . 'model' . DS . 'behaviors' . DS, - 'cache' => LIBS . 'cache' . DS, - 'controller' => LIBS . 'controller' . DS, - 'component' => LIBS . 'controller' . DS . 'components' . DS, - 'helper' => LIBS . 'view' . DS . 'helpers' . DS, - 'model' => LIBS . 'model' . DS, - 'view' => LIBS . 'view' . DS, + 'behavior' => LIBS . 'Model' . DS . 'Behavior' . DS, + 'cache' => LIBS . 'Cache' . DS, + 'controller' => LIBS . 'Controller' . DS, + 'component' => LIBS . 'Controller' . DS . 'Component' . DS, + 'helper' => LIBS . 'View' . DS . 'Helper' . DS, + 'model' => LIBS . 'Model' . DS, + 'view' => LIBS . 'View' . DS, 'core' => LIBS )); } @@ -74,7 +74,7 @@ class ApiShell extends Shell { $class = Inflector::camelize($type); } elseif (count($this->args) > 1) { $file = Inflector::underscore($this->args[1]); - $class = Inflector::camelize($file); + $class = Inflector::camelize($this->args[1]); } $objects = App::objects('class', $path); if (in_array($class, $objects)) { @@ -85,15 +85,15 @@ class ApiShell extends Shell { } } else { - $this->error(__('%s not found', $class)); + $this->error(__d('cake_console', '%s not found', $class)); } - $parsed = $this->__parseClass($path . $file .'.php', $class); + $parsed = $this->__parseClass($path . $class .'.php', $class); if (!empty($parsed)) { if (isset($this->params['method'])) { if (!isset($parsed[$this->params['method']])) { - $this->err(__('%s::%s() could not be found', $class, $this->params['method'])); + $this->err(__d('cake_console', '%s::%s() could not be found', $class, $this->params['method'])); $this->_stop(); } $method = $parsed[$this->params['method']]; @@ -110,9 +110,9 @@ class ApiShell extends Shell { $this->out($list); $methods = array_keys($parsed); - while ($number = strtolower($this->in(__('Select a number to see the more information about a specific method. q to quit. l to list.'), null, 'q'))) { + while ($number = strtolower($this->in(__d('cake_console', 'Select a number to see the more information about a specific method. q to quit. l to list.'), null, 'q'))) { if ($number === 'q') { - $this->out(__('Done')); + $this->out(__d('cake_console', 'Done')); return $this->_stop(); } @@ -145,8 +145,8 @@ class ApiShell extends Shell { 'help' => 'A CakePHP core class name (e.g: Component, HtmlHelper).' ))->addOption('method', array( 'short' => 'm', - 'help' => __('The specific method you want help on.') - ))->description(__('Lookup doc block comments for classes in CakePHP.')); + 'help' => __d('cake_console', 'The specific method you want help on.') + ))->description(__d('cake_console', 'Lookup doc block comments for classes in CakePHP.')); return $parser; } /** @@ -197,9 +197,12 @@ class ApiShell extends Shell { function __parseClass($path, $class) { $parsed = array(); - if (!include_once($path)) { - $this->err(__('%s could not be found', $path)); + if (!class_exists($class)) { + if (!include_once($path)) { + $this->err(__d('cake_console', '%s could not be found', $path)); + } } + $reflection = new ReflectionClass($class); foreach ($reflection->getMethods() as $method) { diff --git a/cake/console/shells/bake.php b/lib/Cake/Console/Command/BakeShell.php similarity index 78% rename from cake/console/shells/bake.php rename to lib/Cake/Console/Command/BakeShell.php index ec741ed3a..b4894dd78 100644 --- a/cake/console/shells/bake.php +++ b/lib/Cake/Console/Command/BakeShell.php @@ -21,6 +21,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Model', 'Model'); + /** * Bake is a command-line code generation utility for automating programmer chores. * @@ -73,7 +75,7 @@ class BakeShell extends Shell { } if (!config('database')) { - $this->out(__('Your database configuration was not found. Take a moment to create one.')); + $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.')); $this->args = null; return $this->DbConfig->execute(); } @@ -88,7 +90,7 @@ class BakeShell extends Shell { $this->out('[T]est case'); $this->out('[Q]uit'); - $classToBake = strtoupper($this->in(__('What would you like to Bake?'), array('D', 'M', 'V', 'C', 'P', 'F', 'T', 'Q'))); + $classToBake = strtoupper($this->in(__d('cake_console', 'What would you like to Bake?'), array('D', 'M', 'V', 'C', 'P', 'F', 'T', 'Q'))); switch ($classToBake) { case 'D': $this->DbConfig->execute(); @@ -115,7 +117,7 @@ class BakeShell extends Shell { exit(0); break; default: - $this->out(__('You have made an invalid selection. Please choose a type of class to Bake by entering D, M, V, F, T, or C.')); + $this->out(__d('cake_console', 'You have made an invalid selection. Please choose a type of class to Bake by entering D, M, V, F, T, or C.')); } $this->hr(); $this->main(); @@ -149,11 +151,11 @@ class BakeShell extends Shell { $modelExists = false; $model = $this->_modelName($name); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (class_exists($model)) { $object = new $model(); $modelExists = true; } else { - App::import('Model', 'Model', false); $object = new Model(array('name' => $name, 'ds' => $this->connection)); } @@ -174,15 +176,16 @@ class BakeShell extends Shell { $this->Controller->bakeTest($controller); } } - if (App::import('Controller', $controller)) { + App::uses($controller . 'Controller', 'Controller'); + if (class_exists($controller . 'Controller')) { $this->View->args = array($controller); $this->View->execute(); } $this->out('', 1, Shell::QUIET); - $this->out(__('Bake All complete'), 1, Shell::QUIET); + $this->out(__d('cake_console', 'Bake All complete'), 1, Shell::QUIET); array_shift($this->args); } else { - $this->error(__('Bake All could not continue without a valid model')); + $this->error(__d('cake_console', 'Bake All could not continue without a valid model')); } return $this->_stop(); } @@ -200,33 +203,33 @@ class BakeShell extends Shell { 'creation process. You can customize the generation process by telling Bake' . 'where different parts of your application are using command line arguments.' )->addSubcommand('all', array( - 'help' => __('Bake a complete MVC. optional of a Model'), + 'help' => __d('cake_console', 'Bake a complete MVC. optional of a Model'), ))->addSubcommand('project', array( - 'help' => __('Bake a new app folder in the path supplied or in current directory if no path is specified'), + 'help' => __d('cake_console', 'Bake a new app folder in the path supplied or in current directory if no path is specified'), 'parser' => $this->Project->getOptionParser() ))->addSubcommand('plugin', array( - 'help' => __('Bake a new plugin folder in the path supplied or in current directory if no path is specified.'), + 'help' => __d('cake_console', 'Bake a new plugin folder in the path supplied or in current directory if no path is specified.'), 'parser' => $this->Plugin->getOptionParser() ))->addSubcommand('db_config', array( - 'help' => __('Bake a database.php file in config directory.'), + 'help' => __d('cake_console', 'Bake a database.php file in config directory.'), 'parser' => $this->DbConfig->getOptionParser() ))->addSubcommand('model', array( - 'help' => __('Bake a model.'), + 'help' => __d('cake_console', 'Bake a model.'), 'parser' => $this->Model->getOptionParser() ))->addSubcommand('view', array( - 'help' => __('Bake views for controllers.'), + 'help' => __d('cake_console', 'Bake views for controllers.'), 'parser' => $this->View->getOptionParser() ))->addSubcommand('controller', array( - 'help' => __('Bake a controller.'), + 'help' => __d('cake_console', 'Bake a controller.'), 'parser' => $this->Controller->getOptionParser() ))->addSubcommand('fixture', array( - 'help' => __('Bake a fixture.'), + 'help' => __d('cake_console', 'Bake a fixture.'), 'parser' => $this->Fixture->getOptionParser() ))->addSubcommand('test', array( - 'help' => __('Bake a unit test.'), + 'help' => __d('cake_console', 'Bake a unit test.'), 'parser' => $this->Test->getOptionParser() ))->addOption('connection', array( - 'help' => __('Database connection to use in conjunction with `bake all`.'), + 'help' => __d('cake_console', 'Database connection to use in conjunction with `bake all`.'), 'short' => 'c', 'default' => 'default' )); diff --git a/cake/console/shells/command_list.php b/lib/Cake/Console/Command/CommandListShell.php similarity index 84% rename from cake/console/shells/command_list.php rename to lib/Cake/Console/Command/CommandListShell.php index e9323c6f7..aa3d0d4ed 100644 --- a/cake/console/shells/command_list.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -16,6 +16,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Inflector', 'Utility'); + /** * Shows a list of commands available from the console. * @@ -79,17 +81,18 @@ class CommandListShell extends Shell { protected function _getShellList() { $shellList = array(); - $corePaths = App::core('shells'); - $shellList = $this->_appendShells('CORE', $corePaths, $shellList); + $shells = App::objects('file', App::core('Console/Command')); + $shellList = $this->_appendShells('CORE', $shells, $shellList); - $appPaths = array_diff(App::path('shells'), $corePaths); - $shellList = $this->_appendShells('app', $appPaths, $shellList); + $appShells = App::objects('Console/Command', null, false); + $shellList = $this->_appendShells('app', $appShells, $shellList); $plugins = App::objects('plugin'); foreach ($plugins as $plugin) { - $pluginPath = App::pluginPath($plugin) . 'console' . DS . 'shells' . DS; - $shellList = $this->_appendShells($plugin, array($pluginPath), $shellList); + $pluginShells = App::objects($plugin . '.Console/Command'); + $shellList = $this->_appendShells($plugin, $pluginShells, $shellList); } + return $shellList; } @@ -98,22 +101,10 @@ class CommandListShell extends Shell { * * @return array */ - protected function _appendShells($type, $paths, $shellList) { - foreach ($paths as $path) { - if (!is_dir($path)) { - continue; - } - $shells = App::objects('file', $path); - - if (empty($shells)) { - continue; - } - foreach ($shells as $shell) { - if ($shell !== 'shell.php' && $shell !== 'app_shell.php') { - $shell = str_replace('.php', '', $shell); - $shellList[$shell][$type] = $type; - } - } + protected function _appendShells($type, $shells, $shellList) { + foreach ($shells as $shell) { + $shell = Inflector::underscore(str_replace('Shell', '', $shell)); + $shellList[$shell][$type] = $type; } return $shellList; } @@ -223,10 +214,10 @@ class CommandListShell extends Shell { $parser = parent::getOptionParser(); return $parser->description('Get the list of available shells for this CakePHP application.') ->addOption('xml', array( - 'help' => __('Get the listing as XML.'), + 'help' => __d('cake_console', 'Get the listing as XML.'), 'boolean' => true ))->addOption('sort', array( - 'help' => __('Sorts the commands by where they are located.'), + 'help' => __d('cake_console', 'Sorts the commands by where they are located.'), 'boolean' => true )); } diff --git a/cake/console/shells/console.php b/lib/Cake/Console/Command/ConsoleShell.php similarity index 96% rename from cake/console/shells/console.php rename to lib/Cake/Console/Command/ConsoleShell.php index 44cc13d45..1e00d7dd7 100644 --- a/cake/console/shells/console.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -51,14 +51,14 @@ class ConsoleShell extends Shell { * */ public function initialize() { - require_once CAKE . 'dispatcher.php'; + App::uses('Dispatcher', 'Routing'); $this->Dispatcher = new Dispatcher(); $this->models = App::objects('model'); - App::import('Model', $this->models); foreach ($this->models as $model) { $class = Inflector::camelize(str_replace('.php', '', $model)); $this->models[$model] = $class; + App::uses($class, 'Model'); $this->{$class} = new $class(); } $this->out('Model classes:'); @@ -333,21 +333,20 @@ class ConsoleShell extends Shell { * @return boolean True if config reload was a success, otherwise false */ protected function _loadRoutes() { - $router = Router::getInstance(); - - $router->reload(); - extract($router->getNamedExpressions()); + Router::reload(); + extract(Router::getNamedExpressions()); if (!@include(CONFIGS . 'routes.php')) { return false; } - $router->parse('/'); + Router::parse('/'); - foreach (array_keys($router->getNamedExpressions()) as $var) { + foreach (array_keys(Router::getNamedExpressions()) as $var) { unset(${$var}); } - for ($i = 0, $len = count($router->routes); $i < $len; $i++) { - $router->routes[$i]->compile(); + + foreach (Router::$routes as $route) { + $route->compile(); } return true; } diff --git a/cake/console/shells/i18n.php b/lib/Cake/Console/Command/I18nShell.php similarity index 69% rename from cake/console/shells/i18n.php rename to lib/Cake/Console/Command/I18nShell.php index 0a2bdeef6..3a3c5691e 100644 --- a/cake/console/shells/i18n.php +++ b/lib/Cake/Console/Command/I18nShell.php @@ -52,7 +52,7 @@ class I18nShell extends Shell { if ($this->command && !in_array($this->command, array('help'))) { if (!config('database')) { - $this->out(__('Your database configuration was not found. Take a moment to create one.'), true); + $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'), true); return $this->DbConfig->execute(); } } @@ -63,14 +63,14 @@ class I18nShell extends Shell { * */ public function main() { - $this->out(__('I18n Shell')); + $this->out(__d('cake_console', 'I18n Shell')); $this->hr(); - $this->out(__('[E]xtract POT file from sources')); - $this->out(__('[I]nitialize i18n database table')); - $this->out(__('[H]elp')); - $this->out(__('[Q]uit')); + $this->out(__d('cake_console', '[E]xtract POT file from sources')); + $this->out(__d('cake_console', '[I]nitialize i18n database table')); + $this->out(__d('cake_console', '[H]elp')); + $this->out(__d('cake_console', '[Q]uit')); - $choice = strtolower($this->in(__('What would you like to do?'), array('E', 'I', 'H', 'Q'))); + $choice = strtolower($this->in(__d('cake_console', 'What would you like to do?'), array('E', 'I', 'H', 'Q'))); switch ($choice) { case 'e': $this->Extract->execute(); @@ -85,7 +85,7 @@ class I18nShell extends Shell { exit(0); break; default: - $this->out(__('You have made an invalid selection. Please choose a command to execute by entering E, I, H, or Q.')); + $this->out(__d('cake_console', 'You have made an invalid selection. Please choose a command to execute by entering E, I, H, or Q.')); } $this->hr(); $this->main(); @@ -107,11 +107,11 @@ class I18nShell extends Shell { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.') + __d('cake_console', 'I18n Shell initializes i18n database table for your application and generates .pot files(s) with translations.') )->addSubcommand('initdb', array( - 'help' => __('Initialize the i18n table.') + 'help' => __d('cake_console', 'Initialize the i18n table.') ))->addSubcommand('extract', array( - 'help' => __('Extract the po translations from your application'), + 'help' => __d('cake_console', 'Extract the po translations from your application'), 'parser' => $this->Extract->getOptionParser() )); } diff --git a/cake/console/shells/schema.php b/lib/Cake/Console/Command/SchemaShell.php similarity index 77% rename from cake/console/shells/schema.php rename to lib/Cake/Console/Command/SchemaShell.php index 3c16edd81..f3faa5890 100644 --- a/cake/console/shells/schema.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -19,8 +19,8 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File', false); -App::import('Model', 'CakeSchema', false); +App::uses('File', 'Utility'); +App::uses('CakeSchema', 'Model'); /** * Schema is a command-line database management utility for automating programmer chores. @@ -112,7 +112,7 @@ class SchemaShell extends Shell { $this->_stop(); } else { $file = $this->Schema->path . DS . $this->params['file']; - $this->err(__('Schema file (%s) could not be found.', $file)); + $this->err(__d('cake_console', 'Schema file (%s) could not be found.', $file)); $this->_stop(); } } @@ -123,7 +123,7 @@ class SchemaShell extends Shell { * */ public function generate() { - $this->out(__('Generating Schema...')); + $this->out(__d('cake_console', 'Generating Schema...')); $options = array(); if (isset($this->params['force'])) { $options = array('models' => false); @@ -182,10 +182,10 @@ class SchemaShell extends Shell { } if ($this->Schema->write($content)) { - $this->out(__('Schema file: %s generated', $content['file'])); + $this->out(__d('cake_console', 'Schema file: %s generated', $content['file'])); $this->_stop(); } else { - $this->err(__('Schema file: %s generated')); + $this->err(__d('cake_console', 'Schema file: %s generated')); $this->_stop(); } } @@ -202,7 +202,7 @@ class SchemaShell extends Shell { $write = false; $Schema = $this->Schema->load(); if (!$Schema) { - $this->err(__('Schema could not be loaded')); + $this->err(__d('cake_console', 'Schema could not be loaded')); $this->_stop(); } if (!empty($this->params['write'])) { @@ -227,10 +227,10 @@ class SchemaShell extends Shell { } if ($File->write($contents)) { - $this->out(__('SQL dump file created in %s', $File->pwd())); + $this->out(__d('cake_console', 'SQL dump file created in %s', $File->pwd())); $this->_stop(); } else { - $this->err(__('SQL dump could not be created')); + $this->err(__d('cake_console', 'SQL dump could not be created')); $this->_stop(); } } @@ -274,7 +274,7 @@ class SchemaShell extends Shell { if (!empty($this->params['dry'])) { $this->__dry = true; - $this->out(__('Performing a dry run.')); + $this->out(__d('cake_console', 'Performing a dry run.')); } $options = array('name' => $name, 'plugin' => $plugin); @@ -286,7 +286,7 @@ class SchemaShell extends Shell { $Schema = $this->Schema->load($options); if (!$Schema) { - $this->err(__('%s could not be loaded', $this->Schema->path . DS . $this->Schema->file)); + $this->err(__d('cake_console', '%s could not be loaded', $this->Schema->path . DS . $this->Schema->file)); $this->_stop(); } $table = null; @@ -317,26 +317,26 @@ class SchemaShell extends Shell { $create[$table] = $db->createSchema($Schema, $table); } if (empty($drop) || empty($create)) { - $this->out(__('Schema is up to date.')); + $this->out(__d('cake_console', 'Schema is up to date.')); $this->_stop(); } - $this->out("\n" . __('The following table(s) will be dropped.')); + $this->out("\n" . __d('cake_console', 'The following table(s) will be dropped.')); $this->out(array_keys($drop)); - if ('y' == $this->in(__('Are you sure you want to drop the table(s)?'), array('y', 'n'), 'n')) { - $this->out(__('Dropping table(s).')); + if ('y' == $this->in(__d('cake_console', 'Are you sure you want to drop the table(s)?'), array('y', 'n'), 'n')) { + $this->out(__d('cake_console', 'Dropping table(s).')); $this->__run($drop, 'drop', $Schema); } - $this->out("\n" . __('The following table(s) will be created.')); + $this->out("\n" . __d('cake_console', 'The following table(s) will be created.')); $this->out(array_keys($create)); - if ('y' == $this->in(__('Are you sure you want to create the table(s)?'), array('y', 'n'), 'y')) { - $this->out(__('Creating table(s).')); + if ('y' == $this->in(__d('cake_console', 'Are you sure you want to create the table(s)?'), array('y', 'n'), 'y')) { + $this->out(__d('cake_console', 'Creating table(s).')); $this->__run($create, 'create', $Schema); } - $this->out(__('End create.')); + $this->out(__d('cake_console', 'End create.')); } /** @@ -348,7 +348,7 @@ class SchemaShell extends Shell { function __update(&$Schema, $table = null) { $db = ConnectionManager::getDataSource($this->Schema->connection); - $this->out(__('Comparing Database to Schema...')); + $this->out(__d('cake_console', 'Comparing Database to Schema...')); $options = array(); if (isset($this->params['force'])) { $options['models'] = false; @@ -367,19 +367,19 @@ class SchemaShell extends Shell { } if (empty($contents)) { - $this->out(__('Schema is up to date.')); + $this->out(__d('cake_console', 'Schema is up to date.')); $this->_stop(); } - $this->out("\n" . __('The following statements will run.')); + $this->out("\n" . __d('cake_console', 'The following statements will run.')); $this->out(array_map('trim', $contents)); - if ('y' == $this->in(__('Are you sure you want to alter the tables?'), array('y', 'n'), 'n')) { + if ('y' == $this->in(__d('cake_console', 'Are you sure you want to alter the tables?'), array('y', 'n'), 'n')) { $this->out(); - $this->out(__('Updating Database...')); + $this->out(__d('cake_console', 'Updating Database...')); $this->__run($contents, 'update', $Schema); } - $this->out(__('End update.')); + $this->out(__d('cake_console', 'End update.')); } /** @@ -389,7 +389,7 @@ class SchemaShell extends Shell { */ function __run($contents, $event, &$Schema) { if (empty($contents)) { - $this->err(__('Sql could not be run')); + $this->err(__d('cake_console', 'Sql could not be run')); return; } Configure::write('debug', 2); @@ -397,10 +397,10 @@ class SchemaShell extends Shell { foreach ($contents as $table => $sql) { if (empty($sql)) { - $this->out(__('%s is up to date.', $table)); + $this->out(__d('cake_console', '%s is up to date.', $table)); } else { if ($this->__dry === true) { - $this->out(__('Dry run for %s :', $table)); + $this->out(__d('cake_console', 'Dry run for %s :', $table)); $this->out($sql); } else { if (!$Schema->before(array($event => $table))) { @@ -416,7 +416,7 @@ class SchemaShell extends Shell { if (!empty($error)) { $this->out($error); } else { - $this->out(__('%s updated.', $table)); + $this->out(__d('cake_console', '%s updated.', $table)); } } } @@ -430,26 +430,26 @@ class SchemaShell extends Shell { */ public function getOptionParser() { $plugin = array( - 'help' => __('The plugin to use.'), + 'help' => __d('cake_console', 'The plugin to use.'), ); $connection = array( - 'help' => __('Set the db config to use.'), + 'help' => __d('cake_console', 'Set the db config to use.'), 'default' => 'default' ); $path = array( - 'help' => __('Path to read and write schema.php'), + 'help' => __d('cake_console', 'Path to read and write schema.php'), 'default' => CONFIGS . 'schema' ); $file = array( - 'help' => __('File name to read and write.'), + 'help' => __d('cake_console', 'File name to read and write.'), 'default' => 'schema.php' ); $name = array( - 'help' => __('Classname to use. If its Plugin.class, both name and plugin options will be set.') + 'help' => __d('cake_console', 'Classname to use. If its Plugin.class, both name and plugin options will be set.') ); $snapshot = array( 'short' => 's', - 'help' => __('Snapshot number to use/make.') + 'help' => __d('cake_console', 'Snapshot number to use/make.') ); $dry = array( 'help' => 'Perform a dry run on create and update commands. Queries will be output instead of run.', @@ -457,11 +457,11 @@ class SchemaShell extends Shell { ); $force = array( 'short' => 'f', - 'help' => __('Force "generate" to create a new schema'), + 'help' => __d('cake_console', 'Force "generate" to create a new schema'), 'boolean' => true ); $write = array( - 'help' => __('Write the dumped SQL to a file.') + 'help' => __d('cake_console', 'Write the dumped SQL to a file.') ); $parser = parent::getOptionParser(); @@ -475,42 +475,42 @@ class SchemaShell extends Shell { 'arguments' => compact('name') ) ))->addSubcommand('generate', array( - 'help' => __('Reads from --connection and writes to --path. Generate snapshots with -s'), + 'help' => __d('cake_console', 'Reads from --connection and writes to --path. Generate snapshots with -s'), 'parser' => array( 'options' => compact('plugin', 'path', 'file', 'name', 'connection', 'snapshot', 'force'), 'arguments' => array( - 'snapshot' => array('help' => __('Generate a snapshot.')) + 'snapshot' => array('help' => __d('cake_console', 'Generate a snapshot.')) ) ) ))->addSubcommand('dump', array( - 'help' => __('Dump database SQL based on a schema file to stdout.'), + 'help' => __d('cake_console', 'Dump database SQL based on a schema file to stdout.'), 'parser' => array( 'options' => compact('plugin', 'path', 'file', 'name', 'connection'), 'arguments' => compact('name') ) ))->addSubcommand('create', array( - 'help' => __('Drop and create tables based on the schema file.'), + 'help' => __d('cake_console', 'Drop and create tables based on the schema file.'), 'parser' => array( 'options' => compact('plugin', 'path', 'file', 'name', 'connection', 'dry', 'snapshot'), 'args' => array( 'name' => array( - 'help' => __('Name of schema to use.') + 'help' => __d('cake_console', 'Name of schema to use.') ), 'table' => array( - 'help' => __('Only create the specified table.') + 'help' => __d('cake_console', 'Only create the specified table.') ) ) ) ))->addSubcommand('update', array( - 'help' => __('Alter the tables based on the schema file.'), + 'help' => __d('cake_console', 'Alter the tables based on the schema file.'), 'parser' => array( 'options' => compact('plugin', 'path', 'file', 'name', 'connection', 'dry', 'snapshot'), 'args' => array( 'name' => array( - 'help' => __('Name of schema to use.') + 'help' => __d('cake_console', 'Name of schema to use.') ), 'table' => array( - 'help' => __('Only create the specified table.') + 'help' => __d('cake_console', 'Only create the specified table.') ) ) ) diff --git a/cake/console/shells/tasks/bake.php b/lib/Cake/Console/Command/Task/BakeTask.php similarity index 93% rename from cake/console/shells/tasks/bake.php rename to lib/Cake/Console/Command/Task/BakeTask.php index bd7f59e69..58fc783ef 100644 --- a/cake/console/shells/tasks/bake.php +++ b/lib/Cake/Console/Command/Task/BakeTask.php @@ -50,7 +50,7 @@ class BakeTask extends Shell { public function getPath() { $path = $this->path; if (isset($this->plugin)) { - $path = $this->_pluginPath($this->plugin) . Inflector::pluralize(Inflector::underscore($this->name)) . DS; + $path = $this->_pluginPath($this->plugin) . $this->name . DS; } return $path; } diff --git a/cake/console/shells/tasks/controller.php b/lib/Cake/Console/Command/Task/ControllerTask.php similarity index 78% rename from cake/console/shells/tasks/controller.php rename to lib/Cake/Console/Command/Task/ControllerTask.php index c3c4e2ea4..6f4723c64 100644 --- a/cake/console/shells/tasks/controller.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -17,7 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; +App::uses('BakeTask', 'Console/Command/Task'); /** * Task class for creating and updating controller files. @@ -71,13 +71,13 @@ class ControllerTask extends BakeTask { $actions = ''; if (!empty($this->params['public'])) { - $this->out(__('Baking basic crud methods for ') . $controller); + $this->out(__d('cake_console', 'Baking basic crud methods for ') . $controller); $actions .= $this->bakeActions($controller); } if (!empty($this->params['admin'])) { $admin = $this->Project->getPrefix(); if ($admin) { - $this->out(__('Adding %s methods', $admin)); + $this->out(__d('cake_console', 'Adding %s methods', $admin)); $actions .= "\n" . $this->bakeActions($controller, $admin); } } @@ -106,7 +106,8 @@ class ControllerTask extends BakeTask { foreach ($this->__tables as $table) { $model = $this->_modelName($table); $controller = $this->_controllerName($model); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (class_exists($model)) { $actions = $this->bakeActions($controller); if ($this->bake($controller, $actions) && $unitTestExists) { $this->bakeTest($controller); @@ -123,7 +124,7 @@ class ControllerTask extends BakeTask { protected function _interactive() { $this->interactive = true; $this->hr(); - $this->out(__("Bake Controller\nPath: %s", $this->path)); + $this->out(__d('cake_console', "Bake Controller\nPath: %s", $this->path)); $this->hr(); if (empty($this->connection)) { @@ -132,7 +133,7 @@ class ControllerTask extends BakeTask { $controllerName = $this->getName(); $this->hr(); - $this->out(__('Baking %sController', $controllerName)); + $this->out(__d('cake_console', 'Baking %sController', $controllerName)); $this->hr(); $helpers = $components = array(); @@ -142,18 +143,17 @@ class ControllerTask extends BakeTask { $useDynamicScaffold = 'n'; $wannaBakeCrud = 'y'; - $controllerFile = strtolower(Inflector::underscore($controllerName)); - $question[] = __("Would you like to build your controller interactively?"); - if (file_exists($this->path . $controllerFile .'_controller.php')) { - $question[] = __("Warning: Choosing no will overwrite the %sController.", $controllerName); + $question[] = __d('cake_console', "Would you like to build your controller interactively?"); + if (file_exists($this->path . $controllerName .'Controller.php')) { + $question[] = __d('cake_console', "Warning: Choosing no will overwrite the %sController.", $controllerName); } $doItInteractive = $this->in(implode("\n", $question), array('y','n'), 'y'); if (strtolower($doItInteractive) == 'y') { $this->interactive = true; $useDynamicScaffold = $this->in( - __("Would you like to use dynamic scaffolding?"), array('y','n'), 'n' + __d('cake_console', "Would you like to use dynamic scaffolding?"), array('y','n'), 'n' ); if (strtolower($useDynamicScaffold) == 'y') { @@ -166,7 +166,7 @@ class ControllerTask extends BakeTask { $components = $this->doComponents(); $wannaUseSession = $this->in( - __("Would you like to use Session flash messages?"), array('y','n'), 'y' + __d('cake_console', "Would you like to use Session flash messages?"), array('y','n'), 'y' ); } } else { @@ -184,7 +184,7 @@ class ControllerTask extends BakeTask { $baked = false; if ($this->interactive === true) { $this->confirmController($controllerName, $useDynamicScaffold, $helpers, $components); - $looksGood = $this->in(__('Look okay?'), array('y','n'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y'); if (strtolower($looksGood) == 'y') { $baked = $this->bake($controllerName, $actions, $helpers, $components); @@ -209,17 +209,17 @@ class ControllerTask extends BakeTask { public function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { $this->out(); $this->hr(); - $this->out(__('The following controller will be created:')); + $this->out(__d('cake_console', 'The following controller will be created:')); $this->hr(); - $this->out(__("Controller Name:\n\t%s", $controllerName)); + $this->out(__d('cake_console', "Controller Name:\n\t%s", $controllerName)); if (strtolower($useDynamicScaffold) == 'y') { $this->out("var \$scaffold;"); } $properties = array( - 'helpers' => __('Helpers:'), - 'components' => __('Components:'), + 'helpers' => __d('cake_console', 'Helpers:'), + 'components' => __d('cake_console', 'Components:'), ); foreach ($properties as $var => $title) { @@ -246,11 +246,11 @@ class ControllerTask extends BakeTask { */ protected function _askAboutMethods() { $wannaBakeCrud = $this->in( - __("Would you like to create some basic class methods \n(index(), add(), view(), edit())?"), + __d('cake_console', "Would you like to create some basic class methods \n(index(), add(), view(), edit())?"), array('y','n'), 'n' ); $wannaBakeAdminCrud = $this->in( - __("Would you like to create the basic class methods for admin routing?"), + __d('cake_console', "Would you like to create the basic class methods for admin routing?"), array('y','n'), 'n' ); return array($wannaBakeCrud, $wannaBakeAdminCrud); @@ -269,10 +269,11 @@ class ControllerTask extends BakeTask { $currentModelName = $modelImport = $this->_modelName($controllerName); $plugin = $this->plugin; if ($plugin) { - $modelImport = $plugin . '.' . $modelImport; + $plugin .= '.'; } - if (!App::import('Model', $modelImport)) { - $this->err(__('You must have a model for this class to build basic methods. Please try again.')); + App::uses($modelImport, $plugin . 'Model'); + if (!class_exists($modelImport)) { + $this->err(__d('cake_console', 'You must have a model for this class to build basic methods. Please try again.')); $this->_stop(); } @@ -286,7 +287,7 @@ class ControllerTask extends BakeTask { $primaryKey = $modelObj->primaryKey; $this->Template->set(compact('plugin', 'admin', 'controllerPath', 'pluralName', 'singularName', - 'singularHumanName', 'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName', + 'singularHumanName', 'pluralHumanName', 'modelObj', 'wannaUseSession', 'currentModelName', 'displayField', 'primaryKey' )); $actions = $this->Template->generate('actions', 'controller_actions'); @@ -313,7 +314,7 @@ class ControllerTask extends BakeTask { $contents = $this->Template->generate('classes', 'controller'); $path = $this->getPath(); - $filename = $path . $this->_controllerPath($controllerName) . '_controller.php'; + $filename = $path . $this->_controllerName($controllerName) . 'Controller.php'; if ($this->createFile($filename, $contents)) { return $contents; } @@ -340,8 +341,8 @@ class ControllerTask extends BakeTask { */ public function doHelpers() { return $this->_doPropertyChoices( - __("Would you like this controller to use other helpers\nbesides HtmlHelper and FormHelper?"), - __("Please provide a comma separated list of the other\nhelper names you'd like to use.\nExample: 'Ajax, Javascript, Time'") + __d('cake_console', "Would you like this controller to use other helpers\nbesides HtmlHelper and FormHelper?"), + __d('cake_console', "Please provide a comma separated list of the other\nhelper names you'd like to use.\nExample: 'Ajax, Javascript, Time'") ); } @@ -352,8 +353,8 @@ class ControllerTask extends BakeTask { */ public function doComponents() { return $this->_doPropertyChoices( - __("Would you like this controller to use any components?"), - __("Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'") + __d('cake_console', "Would you like this controller to use any components?"), + __d('cake_console', "Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'") ); } @@ -389,7 +390,7 @@ class ControllerTask extends BakeTask { $this->__tables = $this->Model->getAllTables($useDbConfig); if ($this->interactive == true) { - $this->out(__('Possible Controllers based on your current database:')); + $this->out(__d('cake_console', 'Possible Controllers based on your current database:')); $this->_controllerNames = array(); $count = count($this->__tables); for ($i = 0; $i < $count; $i++) { @@ -412,14 +413,14 @@ class ControllerTask extends BakeTask { $enteredController = ''; while ($enteredController == '') { - $enteredController = $this->in(__("Enter a number from the list above,\ntype in the name of another controller, or 'q' to exit"), null, 'q'); + $enteredController = $this->in(__d('cake_console', "Enter a number from the list above,\ntype in the name of another controller, or 'q' to exit"), null, 'q'); if ($enteredController === 'q') { - $this->out(__('Exit')); + $this->out(__d('cake_console', 'Exit')); return $this->_stop(); } if ($enteredController == '' || intval($enteredController) > count($controllers)) { - $this->err(__("The Controller name you supplied was empty,\nor the number you selected was not an option. Please try again.")); + $this->err(__d('cake_console', "The Controller name you supplied was empty,\nor the number you selected was not an option. Please try again.")); $enteredController = ''; } } @@ -440,24 +441,24 @@ class ControllerTask extends BakeTask { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Bake a controller for a model. Using options you can bake public, admin or both.') + __d('cake_console', 'Bake a controller for a model. Using options you can bake public, admin or both.') )->addArgument('name', array( - 'help' => __('Name of the controller to bake. Can use Plugin.name to bake controllers into plugins.') + 'help' => __d('cake_console', 'Name of the controller to bake. Can use Plugin.name to bake controllers into plugins.') ))->addOption('public', array( - 'help' => __('Bake a controller with basic crud actions (index, view, add, edit, delete).'), + 'help' => __d('cake_console', 'Bake a controller with basic crud actions (index, view, add, edit, delete).'), 'boolean' => true ))->addOption('admin', array( - 'help' => __('Bake a controller with crud actions for one of the Routing.prefixes.'), + 'help' => __d('cake_console', 'Bake a controller with crud actions for one of the Routing.prefixes.'), 'boolean' => true ))->addOption('plugin', array( 'short' => 'p', - 'help' => __('Plugin to bake the controller into.') + 'help' => __d('cake_console', 'Plugin to bake the controller into.') ))->addOption('connection', array( 'short' => 'c', - 'help' => __('The connection the controller\'s model is on.') + 'help' => __d('cake_console', 'The connection the controller\'s model is on.') ))->addSubcommand('all', array( - 'help' => __('Bake all controllers with CRUD methods.') - ))->epilog(__('Omitting all arguments and options will enter into an interactive mode.')); + 'help' => __d('cake_console', 'Bake all controllers with CRUD methods.') + ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.')); } /** @@ -498,4 +499,4 @@ class ControllerTask extends BakeTask { $this->out(); $this->_stop(); } -} +} \ No newline at end of file diff --git a/cake/console/shells/tasks/db_config.php b/lib/Cake/Console/Command/Task/DbConfigTask.php similarity index 97% rename from cake/console/shells/tasks/db_config.php rename to lib/Cake/Console/Command/Task/DbConfigTask.php index 6aaa9bf5e..2ffdd4ada 100644 --- a/cake/console/shells/tasks/db_config.php +++ b/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -351,7 +351,7 @@ class DbConfigTask extends Shell { * @return void */ public function getConfig() { - App::import('Model', 'ConnectionManager', false); + App::uses('ConnectionManager', 'Model'); $useDbConfig = 'default'; $configs = get_class_vars($this->databaseClassName); @@ -361,7 +361,7 @@ class DbConfigTask extends Shell { $connections = array_keys($configs); if (count($connections) > 1) { - $useDbConfig = $this->in(__('Use Database Config') .':', $connections, 'default'); + $useDbConfig = $this->in(__d('cake_console', 'Use Database Config') .':', $connections, 'default'); } return $useDbConfig; } @@ -374,7 +374,7 @@ class DbConfigTask extends Shell { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Bake new database configuration settings.') + __d('cake_console', 'Bake new database configuration settings.') ); } } diff --git a/cake/console/shells/tasks/extract.php b/lib/Cake/Console/Command/Task/ExtractTask.php similarity index 77% rename from cake/console/shells/tasks/extract.php rename to lib/Cake/Console/Command/Task/ExtractTask.php index 9965876e2..8e20fabe2 100644 --- a/cake/console/shells/tasks/extract.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); +App::uses('File', 'Utility'); /** * Language string extractor * @@ -112,11 +112,11 @@ class ExtractTask extends Shell { $this->__paths = explode(',', $this->params['paths']); } else { $defaultPath = APP_PATH; - $message = __("What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one", $this->Dispatch->params['root'] . DS . 'myapp'); + $message = __d('cake_console', "What is the full path you would like to extract?\nExample: %s\n[Q]uit [D]one", $defaultPath); while (true) { $response = $this->in($message, null, $defaultPath); if (strtoupper($response) === 'Q') { - $this->out(__('Extract Aborted')); + $this->out(__d('cake_console', 'Extract Aborted')); $this->_stop(); } elseif (strtoupper($response) === 'D') { $this->out(); @@ -125,7 +125,7 @@ class ExtractTask extends Shell { $this->__paths[] = $response; $defaultPath = 'D'; } else { - $this->err(__('The directory path you supplied was not found. Please try again.')); + $this->err(__d('cake_console', 'The directory path you supplied was not found. Please try again.')); } $this->out(); } @@ -134,17 +134,17 @@ class ExtractTask extends Shell { if (isset($this->params['output'])) { $this->__output = $this->params['output']; } else { - $message = __("What is the full path you would like to output?\nExample: %s\n[Q]uit", $this->__paths[0] . DS . 'locale'); + $message = __d('cake_console', "What is the full path you would like to output?\nExample: %s\n[Q]uit", $this->__paths[0] . DS . 'locale'); while (true) { $response = $this->in($message, null, $this->__paths[0] . DS . 'locale'); if (strtoupper($response) === 'Q') { - $this->out(__('Extract Aborted')); + $this->out(__d('cake_console', 'Extract Aborted')); $this->_stop(); } elseif (is_dir($response)) { $this->__output = $response . DS; break; } else { - $this->err(__('The directory path you supplied was not found. Please try again.')); + $this->err(__d('cake_console', 'The directory path you supplied was not found. Please try again.')); } $this->out(); } @@ -154,7 +154,7 @@ class ExtractTask extends Shell { $this->__merge = !(strtolower($this->params['merge']) === 'no'); } else { $this->out(); - $response = $this->in(__('Would you like to merge all domains strings into the default.pot file?'), array('y', 'n'), 'n'); + $response = $this->in(__d('cake_console', 'Would you like to merge all domains strings into the default.pot file?'), array('y', 'n'), 'n'); $this->__merge = strtolower($response) === 'y'; } @@ -173,13 +173,13 @@ class ExtractTask extends Shell { function __extract() { $this->out(); $this->out(); - $this->out(__('Extracting...')); + $this->out(__d('cake_console', 'Extracting...')); $this->hr(); - $this->out(__('Paths:')); + $this->out(__d('cake_console', 'Paths:')); foreach ($this->__paths as $path) { $this->out(' ' . $path); } - $this->out(__('Output Directory: ') . $this->__output); + $this->out(__d('cake_console', 'Output Directory: ') . $this->__output); $this->hr(); $this->__extractTokens(); $this->__buildFiles(); @@ -187,7 +187,7 @@ class ExtractTask extends Shell { $this->__paths = $this->__files = $this->__storage = array(); $this->__strings = $this->__tokens = array(); $this->out(); - $this->out(__('Done.')); + $this->out(__d('cake_console', 'Done.')); } /** @@ -197,17 +197,17 @@ class ExtractTask extends Shell { */ public function getOptionParser() { $parser = parent::getOptionParser(); - return $parser->description(__('CakePHP Language String Extraction:')) - ->addOption('app', array('help' => __('Directory where your application is located.'))) - ->addOption('paths', array('help' => __('Comma separted list of paths, full paths are needed.'))) + return $parser->description(__d('cake_console', 'CakePHP Language String Extraction:')) + ->addOption('app', array('help' => __d('cake_console', 'Directory where your application is located.'))) + ->addOption('paths', array('help' => __d('cake_console', 'Comma separted list of paths, full paths are needed.'))) ->addOption('merge', array( - 'help' => __('Merge all domain strings into the default.po file.'), + 'help' => __d('cake_console', 'Merge all domain strings into the default.po file.'), 'choices' => array('yes', 'no') )) - ->addOption('output', array('help' => __('Full path to output directory.'))) - ->addOption('files', array('help' => __('Comma separated list of files, full paths are needed.'))) + ->addOption('output', array('help' => __d('cake_console', 'Full path to output directory.'))) + ->addOption('files', array('help' => __d('cake_console', 'Comma separated list of files, full paths are needed.'))) ->addOption('exclude', array( - 'help' => __('Comma separated list of directories to exclude. Any path containing a path segment with the provided values will be skipped. E.g. test,vendors') + 'help' => __d('cake_console', 'Comma separated list of directories to exclude. Any path containing a path segment with the provided values will be skipped. E.g. test,vendors') )); } @@ -217,25 +217,25 @@ class ExtractTask extends Shell { * @return void */ public function help() { - $this->out(__('CakePHP Language String Extraction:')); + $this->out(__d('cake_console', 'CakePHP Language String Extraction:')); $this->hr(); - $this->out(__('The Extract script generates .pot file(s) with translations')); - $this->out(__('By default the .pot file(s) will be place in the locale directory of -app')); - $this->out(__('By default -app is ROOT/app')); + $this->out(__d('cake_console', 'The Extract script generates .pot file(s) with translations')); + $this->out(__d('cake_console', 'By default the .pot file(s) will be place in the locale directory of -app')); + $this->out(__d('cake_console', 'By default -app is ROOT/app')); $this->hr(); - $this->out(__('Usage: cake i18n extract ...')); + $this->out(__d('cake_console', 'Usage: cake i18n extract ...')); $this->out(); - $this->out(__('Params:')); - $this->out(__(' -app [path...]: directory where your application is located')); - $this->out(__(' -root [path...]: path to install')); - $this->out(__(' -core [path...]: path to cake directory')); - $this->out(__(' -paths [comma separated list of paths, full path is needed]')); - $this->out(__(' -merge [yes|no]: Merge all domains strings into the default.pot file')); - $this->out(__(' -output [path...]: Full path to output directory')); - $this->out(__(' -files: [comma separated list of files, full path to file is needed]')); + $this->out(__d('cake_console', 'Params:')); + $this->out(__d('cake_console', ' -app [path...]: directory where your application is located')); + $this->out(__d('cake_console', ' -root [path...]: path to install')); + $this->out(__d('cake_console', ' -core [path...]: path to cake directory')); + $this->out(__d('cake_console', ' -paths [comma separated list of paths, full path is needed]')); + $this->out(__d('cake_console', ' -merge [yes|no]: Merge all domains strings into the default.pot file')); + $this->out(__d('cake_console', ' -output [path...]: Full path to output directory')); + $this->out(__d('cake_console', ' -files: [comma separated list of files, full path to file is needed]')); $this->out(); - $this->out(__('Commands:')); - $this->out(__(' cake i18n extract help: Shows this help message.')); + $this->out(__d('cake_console', 'Commands:')); + $this->out(__d('cake_console', ' cake i18n extract help: Shows this help message.')); $this->out(); } @@ -248,7 +248,7 @@ class ExtractTask extends Shell { function __extractTokens() { foreach ($this->__files as $file) { $this->__file = $file; - $this->out(__('Processing %s...', $file)); + $this->out(__d('cake_console', 'Processing %s...', $file)); $code = file_get_contents($file); $allTokens = token_get_all($code); @@ -411,11 +411,11 @@ class ExtractTask extends Shell { $response = ''; while ($overwriteAll === false && $File->exists() && strtoupper($response) !== 'Y') { $this->out(); - $response = $this->in(__('Error: %s already exists in this location. Overwrite? [Y]es, [N]o, [A]ll', $filename), array('y', 'n', 'a'), 'y'); + $response = $this->in(__d('cake_console', 'Error: %s already exists in this location. Overwrite? [Y]es, [N]o, [A]ll', $filename), array('y', 'n', 'a'), 'y'); if (strtoupper($response) === 'N') { $response = ''; while ($response == '') { - $response = $this->in(__("What would you like to name this file?\nExample: %s", 'new_' . $filename), null, 'new_' . $filename); + $response = $this->in(__d('cake_console', "What would you like to name this file?\nExample: %s", 'new_' . $filename), null, 'new_' . $filename); $File = new File($this->__output . $response); $filename = $response; } @@ -483,7 +483,7 @@ class ExtractTask extends Shell { * @access private */ function __markerError($file, $line, $marker, $count) { - $this->out(__("Invalid marker content in %s:%s\n* %s(", $file, $line, $marker), true); + $this->out(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker), true); $count += 2; $tokenCount = count($this->__tokens); $parenthesis = 1; diff --git a/cake/console/shells/tasks/fixture.php b/lib/Cake/Console/Command/Task/FixtureTask.php similarity index 88% rename from cake/console/shells/tasks/fixture.php rename to lib/Cake/Console/Command/Task/FixtureTask.php index 6a527672c..daf3e412d 100644 --- a/cake/console/shells/tasks/fixture.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -16,7 +16,10 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; + +App::uses('BakeTask', 'Console/Command/Task'); +App::uses('Model', 'Model'); + /** * Task class for creating and updating fixtures files. * @@ -54,7 +57,7 @@ class FixtureTask extends BakeTask { */ public function __construct($stdout = null, $stderr = null, $stdin = null) { parent::__construct($stdout, $stderr, $stdin); - $this->path = APP . 'tests' . DS . 'fixtures' . DS; + $this->path = APP . 'tests' . DS . 'Fixture' . DS; } /** @@ -65,25 +68,25 @@ class FixtureTask extends BakeTask { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.') + __d('cake_console', 'Generate fixtures for use with the test suite. You can use `bake fixture all` to bake all fixtures.') )->addArgument('name', array( - 'help' => __('Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.') + 'help' => __d('cake_console', 'Name of the fixture to bake. Can use Plugin.name to bake plugin fixtures.') ))->addOption('count', array( - 'help' => __('When using generated data, the number of records to include in the fixture(s).'), + 'help' => __d('cake_console', 'When using generated data, the number of records to include in the fixture(s).'), 'short' => 'n', 'default' => 10 ))->addOption('connection', array( - 'help' => __('Which database configuration to use for baking.'), + 'help' => __d('cake_console', 'Which database configuration to use for baking.'), 'short' => 'c', 'default' => 'default' ))->addOption('plugin', array( - 'help' => __('CamelCased name of the plugin to bake fixtures for.'), + 'help' => __d('cake_console', 'CamelCased name of the plugin to bake fixtures for.'), 'short' => 'p', ))->addOption('records', array( 'help' => 'Used with --count and /all commands to pull [n] records from the live tables, where [n] is either --count or the default of 10', 'short' => 'r', 'boolean' => true - ))->epilog(__('Omitting all arguments and options will enter into an interactive mode.'));; + ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.'));; } /** @@ -155,16 +158,16 @@ class FixtureTask extends BakeTask { */ public function importOptions($modelName) { $options = array(); - $doSchema = $this->in(__('Would you like to import schema for this fixture?'), array('y', 'n'), 'n'); + $doSchema = $this->in(__d('cake_console', 'Would you like to import schema for this fixture?'), array('y', 'n'), 'n'); if ($doSchema == 'y') { $options['schema'] = $modelName; } - $doRecords = $this->in(__('Would you like to use record importing for this fixture?'), array('y', 'n'), 'n'); + $doRecords = $this->in(__d('cake_console', 'Would you like to use record importing for this fixture?'), array('y', 'n'), 'n'); if ($doRecords == 'y') { $options['records'] = true; } if ($doRecords == 'n') { - $prompt = __("Would you like to build this fixture with data from %s's table?", $modelName); + $prompt = __d('cake_console', "Would you like to build this fixture with data from %s's table?", $modelName); $fromTable = $this->in($prompt, array('y', 'n'), 'n'); if (strtolower($fromTable) == 'y') { $options['fromTable'] = true; @@ -182,9 +185,7 @@ class FixtureTask extends BakeTask { * @return string Baked fixture content */ public function bake($model, $useTable = false, $importOptions = array()) { - if (!class_exists('CakeSchema')) { - App::import('Model', 'CakeSchema', false); - } + App::uses('CakeSchema', 'Model'); $table = $schema = $records = $import = $modelImport = null; $importBits = array(); @@ -248,7 +249,7 @@ class FixtureTask extends BakeTask { $vars = array_merge($defaults, $otherVars); $path = $this->getPath(); - $filename = Inflector::underscore($model) . '_fixture.php'; + $filename = Inflector::camelize($model) . 'Fixture.php'; $this->Template->set('model', $model); $this->Template->set($vars); @@ -267,7 +268,7 @@ class FixtureTask extends BakeTask { public function getPath() { $path = $this->path; if (isset($this->plugin)) { - $path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'fixtures' . DS; + $path = $this->_pluginPath($this->plugin) . 'tests' . DS . 'Fixture' . DS; } return $path; } @@ -386,14 +387,13 @@ class FixtureTask extends BakeTask { protected function _getRecordsFromTable($modelName, $useTable = null) { if ($this->interactive) { $condition = null; - $prompt = __("Please provide a SQL fragment to use as conditions\nExample: WHERE 1=1 LIMIT 10"); + $prompt = __d('cake_console', "Please provide a SQL fragment to use as conditions\nExample: WHERE 1=1 LIMIT 10"); while (!$condition) { $condition = $this->in($prompt, null, 'WHERE 1=1 LIMIT 10'); } } else { $condition = 'WHERE 1=1 LIMIT ' . (isset($this->params['count']) ? $this->params['count'] : 10); } - App::import('Model', 'Model', false); $modelObject = new Model(array('name' => $modelName, 'table' => $useTable, 'ds' => $this->connection)); $records = $modelObject->find('all', array( 'conditions' => $condition, diff --git a/cake/console/shells/tasks/model.php b/lib/Cake/Console/Command/Task/ModelTask.php similarity index 82% rename from cake/console/shells/tasks/model.php rename to lib/Cake/Console/Command/Task/ModelTask.php index ed8d0402c..1c63147fb 100644 --- a/cake/console/shells/tasks/model.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -17,7 +17,10 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; +App::uses('BakeTask', 'Console/Command/Task'); +App::uses('ConnectionManager', 'Model'); +App::uses('Model', 'Model'); +App::uses('Validation', 'Utility'); /** * Task class for creating and updating model files. @@ -71,7 +74,6 @@ class ModelTask extends BakeTask { * */ public function execute() { - App::import('Model', 'Model', false); parent::execute(); if (empty($this->args)) { @@ -110,7 +112,7 @@ class ModelTask extends BakeTask { continue; } $modelClass = Inflector::classify($table); - $this->out(__('Baking %s', $modelClass)); + $this->out(__d('cake_console', 'Baking %s', $modelClass)); $object = $this->_getModelObject($modelClass); if ($this->bake($object, false) && $unitTestExists) { $this->bakeFixture($modelClass); @@ -149,7 +151,7 @@ class ModelTask extends BakeTask { $this->out($i + 1 .'. ' . $option); } if (empty($prompt)) { - $prompt = __('Make a selection from the choices above'); + $prompt = __d('cake_console', 'Make a selection from the choices above'); } $choice = $this->in($prompt, null, $default); if (intval($choice) > 0 && intval($choice) <= $max) { @@ -188,7 +190,7 @@ class ModelTask extends BakeTask { $primaryKey = $this->findPrimaryKey($fields); } } else { - $this->err(__('Table %s does not exist, cannot bake a model without a table.', $useTable)); + $this->err(__d('cake_console', 'Table %s does not exist, cannot bake a model without a table.', $useTable)); $this->_stop(); return false; } @@ -197,13 +199,13 @@ class ModelTask extends BakeTask { $displayField = $this->findDisplayField($tempModel->schema()); } - $prompt = __("Would you like to supply validation criteria \nfor the fields in your model?"); + $prompt = __d('cake_console', "Would you like to supply validation criteria \nfor the fields in your model?"); $wannaDoValidation = $this->in($prompt, array('y','n'), 'y'); if (array_search($useTable, $this->_tables) !== false && strtolower($wannaDoValidation) == 'y') { $validate = $this->doValidation($tempModel); } - $prompt = __("Would you like to define model associations\n(hasMany, hasOne, belongsTo, etc.)?"); + $prompt = __d('cake_console', "Would you like to define model associations\n(hasMany, hasOne, belongsTo, etc.)?"); $wannaDoAssoc = $this->in($prompt, array('y','n'), 'y'); if (strtolower($wannaDoAssoc) == 'y') { $associations = $this->doAssociations($tempModel); @@ -211,24 +213,24 @@ class ModelTask extends BakeTask { $this->out(); $this->hr(); - $this->out(__('The following Model will be created:')); + $this->out(__d('cake_console', 'The following Model will be created:')); $this->hr(); $this->out("Name: " . $currentModelName); if ($this->connection !== 'default') { - $this->out(__("DB Config: %s", $this->connection)); + $this->out(__d('cake_console', "DB Config: %s", $this->connection)); } if ($fullTableName !== Inflector::tableize($currentModelName)) { - $this->out(__('DB Table: %s', $fullTableName)); + $this->out(__d('cake_console', 'DB Table: %s', $fullTableName)); } if ($primaryKey != 'id') { - $this->out(__('Primary Key: %s', $primaryKey)); + $this->out(__d('cake_console', 'Primary Key: %s', $primaryKey)); } if (!empty($validate)) { - $this->out(__('Validation: %s', print_r($validate, true))); + $this->out(__d('cake_console', 'Validation: %s', print_r($validate, true))); } if (!empty($associations)) { - $this->out(__('Associations:')); + $this->out(__d('cake_console', 'Associations:')); $assocKeys = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); foreach ($assocKeys as $assocKey) { $this->_printAssociation($currentModelName, $assocKey, $associations); @@ -236,7 +238,7 @@ class ModelTask extends BakeTask { } $this->hr(); - $looksGood = $this->in(__('Look okay?'), array('y','n'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y'); if (strtolower($looksGood) == 'y') { $vars = compact('associations', 'validate', 'primaryKey', 'useTable', 'displayField'); @@ -281,7 +283,7 @@ class ModelTask extends BakeTask { break; } } - return $this->in(__('What is the primaryKey?'), null, $name); + return $this->in(__d('cake_console', 'What is the primaryKey?'), null, $name); } /** @@ -292,12 +294,12 @@ class ModelTask extends BakeTask { */ public function findDisplayField($fields) { $fieldNames = array_keys($fields); - $prompt = __("A displayField could not be automatically detected\nwould you like to choose one?"); + $prompt = __d('cake_console', "A displayField could not be automatically detected\nwould you like to choose one?"); $continue = $this->in($prompt, array('y', 'n')); if (strtolower($continue) == 'n') { return false; } - $prompt = __('Choose a field from the options above:'); + $prompt = __d('cake_console', 'Choose a field from the options above:'); $choice = $this->inOptions($fieldNames, $prompt); return $fieldNames[$choice]; } @@ -365,10 +367,10 @@ class ModelTask extends BakeTask { while ($anotherValidator == 'y') { if ($this->interactive) { $this->out(); - $this->out(__('Field: %s', $fieldName)); - $this->out(__('Type: %s', $metaData['type'])); + $this->out(__d('cake_console', 'Field: %s', $fieldName)); + $this->out(__d('cake_console', 'Type: %s', $metaData['type'])); $this->hr(); - $this->out(__('Please select one of the following validation options:')); + $this->out(__d('cake_console', 'Please select one of the following validation options:')); $this->hr(); } @@ -376,8 +378,8 @@ class ModelTask extends BakeTask { for ($i = 1; $i < $defaultChoice; $i++) { $prompt .= $i . ' - ' . $this->_validations[$i] . "\n"; } - $prompt .= __("%s - Do not do any validation on this field.\n", $defaultChoice); - $prompt .= __("... or enter in a valid regex validation string.\n"); + $prompt .= __d('cake_console', "%s - Do not do any validation on this field.\n", $defaultChoice); + $prompt .= __d('cake_console', "... or enter in a valid regex validation string.\n"); $methods = array_flip($this->_validations); $guess = $defaultChoice; @@ -400,11 +402,11 @@ class ModelTask extends BakeTask { if ($this->interactive === true) { $choice = $this->in($prompt, null, $guess); if (in_array($choice, $alreadyChosen)) { - $this->out(__("You have already chosen that validation rule,\nplease choose again")); + $this->out(__d('cake_console', "You have already chosen that validation rule,\nplease choose again")); continue; } if (!isset($this->_validations[$choice]) && is_numeric($choice)) { - $this->out(__('Please make a valid selection.')); + $this->out(__d('cake_console', 'Please make a valid selection.')); continue; } $alreadyChosen[] = $choice; @@ -426,7 +428,7 @@ class ModelTask extends BakeTask { } } if ($this->interactive == true && $choice != $defaultChoice) { - $anotherValidator = $this->in(__('Would you like to add another validation rule?'), array('y', 'n'), 'n'); + $anotherValidator = $this->in(__d('cake_console', 'Would you like to add another validation rule?'), array('y', 'n'), 'n'); } else { $anotherValidator = 'n'; } @@ -445,7 +447,7 @@ class ModelTask extends BakeTask { return false; } if ($this->interactive === true) { - $this->out(__('One moment while the associations are detected.')); + $this->out(__d('cake_console', 'One moment while the associations are detected.')); } $fields = $model->schema(true); @@ -473,9 +475,9 @@ class ModelTask extends BakeTask { if ($this->interactive === true) { $this->hr(); if (empty($associations)) { - $this->out(__('None found.')); + $this->out(__d('cake_console', 'None found.')); } else { - $this->out(__('Please confirm the following associations:')); + $this->out(__d('cake_console', 'Please confirm the following associations:')); $this->hr(); $associations = $this->confirmAssociations($model, $associations); } @@ -632,19 +634,19 @@ class ModelTask extends BakeTask { * @return array Array of associations. */ public function doMoreAssociations($model, $associations) { - $prompt = __('Would you like to define some additional model associations?'); + $prompt = __d('cake_console', 'Would you like to define some additional model associations?'); $wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n'); $possibleKeys = $this->_generatePossibleKeys(); while (strtolower($wannaDoMoreAssoc) == 'y') { $assocs = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); - $this->out(__('What is the association type?')); - $assocType = intval($this->inOptions($assocs, __('Enter a number'))); + $this->out(__d('cake_console', 'What is the association type?')); + $assocType = intval($this->inOptions($assocs, __d('cake_console', 'Enter a number'))); - $this->out(__("For the following options be very careful to match your setup exactly.\nAny spelling mistakes will cause errors.")); + $this->out(__d('cake_console', "For the following options be very careful to match your setup exactly.\nAny spelling mistakes will cause errors.")); $this->hr(); - $alias = $this->in(__('What is the alias for this association?')); - $className = $this->in(__('What className will %s use?', $alias), null, $alias ); + $alias = $this->in(__d('cake_console', 'What is the alias for this association?')); + $className = $this->in(__d('cake_console', 'What className will %s use?', $alias), null, $alias ); $suggestedForeignKey = null; if ($assocType == 0) { @@ -659,22 +661,22 @@ class ModelTask extends BakeTask { $showKeys = null; } } else { - $otherTable = $this->in(__('What is the table for this model?')); + $otherTable = $this->in(__d('cake_console', 'What is the table for this model?')); $showKeys = $possibleKeys[$otherTable]; } $suggestedForeignKey = $this->_modelKey($model->name); } if (!empty($showKeys)) { - $this->out(__('A helpful List of possible keys')); - $foreignKey = $this->inOptions($showKeys, __('What is the foreignKey?')); + $this->out(__d('cake_console', 'A helpful List of possible keys')); + $foreignKey = $this->inOptions($showKeys, __d('cake_console', 'What is the foreignKey?')); $foreignKey = $showKeys[intval($foreignKey)]; } if (!isset($foreignKey)) { - $foreignKey = $this->in(__('What is the foreignKey? Specify your own.'), null, $suggestedForeignKey); + $foreignKey = $this->in(__d('cake_console', 'What is the foreignKey? Specify your own.'), null, $suggestedForeignKey); } if ($assocType == 3) { - $associationForeignKey = $this->in(__('What is the associationForeignKey?'), null, $this->_modelKey($model->name)); - $joinTable = $this->in(__('What is the joinTable?')); + $associationForeignKey = $this->in(__d('cake_console', 'What is the associationForeignKey?'), null, $this->_modelKey($model->name)); + $joinTable = $this->in(__d('cake_console', 'What is the joinTable?')); } $associations[$assocs[$assocType]] = array_values((array)$associations[$assocs[$assocType]]); $count = count($associations[$assocs[$assocType]]); @@ -686,7 +688,7 @@ class ModelTask extends BakeTask { $associations[$assocs[$assocType]][$i]['associationForeignKey'] = $associationForeignKey; $associations[$assocs[$assocType]][$i]['joinTable'] = $joinTable; } - $wannaDoMoreAssoc = $this->in(__('Define another association?'), array('y','n'), 'y'); + $wannaDoMoreAssoc = $this->in(__d('cake_console', 'Define another association?'), array('y','n'), 'y'); } return $associations; } @@ -739,7 +741,7 @@ class ModelTask extends BakeTask { $out = $this->Template->generate('classes', 'model'); $path = $this->getPath(); - $filename = $path . Inflector::underscore($name) . '.php'; + $filename = $path . $name . '.php'; $this->out("\nBaking model class for $name...", 1, Shell::QUIET); $this->createFile($filename, $out); ClassRegistry::flush(); @@ -767,7 +769,7 @@ class ModelTask extends BakeTask { $this->_tables = $this->getAllTables($useDbConfig); if ($this->interactive === true) { - $this->out(__('Possible Models based on your current database:')); + $this->out(__d('cake_console', 'Possible Models based on your current database:')); $this->_modelNames = array(); $count = count($this->_tables); for ($i = 0; $i < $count; $i++) { @@ -789,7 +791,6 @@ class ModelTask extends BakeTask { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; } - App::import('Model', 'ConnectionManager', false); $db = ConnectionManager::getDataSource($useDbConfig); $useTable = Inflector::tableize($modelName); @@ -798,11 +799,11 @@ class ModelTask extends BakeTask { if (array_search($useTable, $this->_tables) === false) { $this->out(); - $this->out(__("Given your model named '%s',\nCake would expect a database table named '%s'", $modelName, $fullTableName)); - $tableIsGood = $this->in(__('Do you want to use this table?'), array('y','n'), 'y'); + $this->out(__d('cake_console', "Given your model named '%s',\nCake would expect a database table named '%s'", $modelName, $fullTableName)); + $tableIsGood = $this->in(__d('cake_console', 'Do you want to use this table?'), array('y','n'), 'y'); } if (strtolower($tableIsGood) == 'n') { - $useTable = $this->in(__('What is the name of the table?')); + $useTable = $this->in(__d('cake_console', 'What is the name of the table?')); } return $useTable; } @@ -818,7 +819,6 @@ class ModelTask extends BakeTask { if (!isset($useDbConfig)) { $useDbConfig = $this->connection; } - App::import('Model', 'ConnectionManager', false); $tables = array(); $db = ConnectionManager::getDataSource($useDbConfig); @@ -834,7 +834,7 @@ class ModelTask extends BakeTask { $tables = $db->listSources(); } if (empty($tables)) { - $this->err(__('Your database does not have any tables.')); + $this->err(__d('cake_console', 'Your database does not have any tables.')); $this->_stop(); } return $tables; @@ -851,15 +851,15 @@ class ModelTask extends BakeTask { $enteredModel = ''; while ($enteredModel == '') { - $enteredModel = $this->in(__("Enter a number from the list above,\ntype in the name of another model, or 'q' to exit"), null, 'q'); + $enteredModel = $this->in(__d('cake_console', "Enter a number from the list above,\ntype in the name of another model, or 'q' to exit"), null, 'q'); if ($enteredModel === 'q') { - $this->out(__('Exit')); + $this->out(__d('cake_console', 'Exit')); $this->_stop(); } if ($enteredModel == '' || intval($enteredModel) > count($this->_modelNames)) { - $this->err(__("The model name you supplied was empty,\nor the number you selected was not an option. Please try again.")); + $this->err(__d('cake_console', "The model name you supplied was empty,\nor the number you selected was not an option. Please try again.")); $enteredModel = ''; } } @@ -879,18 +879,18 @@ class ModelTask extends BakeTask { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Bake models.') + __d('cake_console', 'Bake models.') )->addArgument('name', array( - 'help' => __('Name of the model to bake. Can use Plugin.name to bake plugin models.') + 'help' => __d('cake_console', 'Name of the model to bake. Can use Plugin.name to bake plugin models.') ))->addSubcommand('all', array( - 'help' => __('Bake all model files with associations and validation.') + 'help' => __d('cake_console', 'Bake all model files with associations and validation.') ))->addOption('plugin', array( 'short' => 'p', - 'help' => __('Plugin to bake the model into.') + 'help' => __d('cake_console', 'Plugin to bake the model into.') ))->addOption('connection', array( 'short' => 'c', - 'help' => __('The connection the model table is on.') - ))->epilog(__('Omitting all arguments and options will enter into an interactive mode.')); + 'help' => __d('cake_console', 'The connection the model table is on.') + ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.')); } /** diff --git a/cake/console/shells/tasks/plugin.php b/lib/Cake/Console/Command/Task/PluginTask.php similarity index 82% rename from cake/console/shells/tasks/plugin.php rename to lib/Cake/Console/Command/Task/PluginTask.php index 118273d45..1b6033137 100644 --- a/cake/console/shells/tasks/plugin.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -16,7 +16,9 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); + +App::uses('File', 'Utility'); +App::uses('Folder', 'Utility'); /** * Task class for creating a plugin @@ -54,8 +56,8 @@ class PluginTask extends Shell { $plugin = Inflector::camelize($this->args[0]); $pluginPath = $this->_pluginPath($plugin); if (is_dir($pluginPath)) { - $this->out(__('Plugin: %s', $plugin)); - $this->out(__('Path: %s', $pluginPath)); + $this->out(__d('cake_console', 'Plugin: %s', $plugin)); + $this->out(__d('cake_console', 'Path: %s', $pluginPath)); } else { $this->_interactive($plugin); } @@ -72,11 +74,11 @@ class PluginTask extends Shell { */ protected function _interactive($plugin = null) { while ($plugin === null) { - $plugin = $this->in(__('Enter the name of the plugin in CamelCase format')); + $plugin = $this->in(__d('cake_console', 'Enter the name of the plugin in CamelCase format')); } if (!$this->bake($plugin)) { - $this->error(__("An error occured trying to bake: %s in %s", $plugin, $this->path . Inflector::underscore($pluginPath))); + $this->error(__d('cake_console', "An error occured trying to bake: %s in %s", $plugin, $this->path . Inflector::underscore($pluginPath))); } } @@ -95,11 +97,11 @@ class PluginTask extends Shell { $this->findPath($pathOptions); } $this->hr(); - $this->out(__("Plugin Name: %s", $plugin)); - $this->out(__("Plugin Directory: %s", $this->path . $pluginPath)); + $this->out(__d('cake_console', "Plugin Name: %s", $plugin)); + $this->out(__d('cake_console', "Plugin Directory: %s", $this->path . $pluginPath)); $this->hr(); - $looksGood = $this->in(__('Look okay?'), array('y', 'n', 'q'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n', 'q'), 'y'); if (strtolower($looksGood) == 'y') { $Folder = new Folder($this->path . $pluginPath); @@ -154,7 +156,7 @@ class PluginTask extends Shell { $this->createFile($this->path . $pluginPath . DS . $modelFileName, $out); $this->hr(); - $this->out(__('Created: %s in %s', $plugin, $this->path . $pluginPath), 2); + $this->out(__d('cake_console', 'Created: %s in %s', $plugin, $this->path . $pluginPath), 2); } return true; @@ -172,7 +174,7 @@ class PluginTask extends Shell { foreach ($pathOptions as $i => $option) { $this->out($i + 1 .'. ' . $option); } - $prompt = __('Choose a plugin path from the paths above.'); + $prompt = __d('cake_console', 'Choose a plugin path from the paths above.'); $choice = $this->in($prompt); if (intval($choice) > 0 && intval($choice) <= $max) { $valid = true; @@ -192,7 +194,7 @@ class PluginTask extends Shell { 'Create the directory structure, AppModel and AppController classes for a new plugin. ' . 'Can create plugins in any of your bootstrapped plugin paths.' )->addArgument('name', array( - 'help' => __('CamelCased name of the plugin to create.') + 'help' => __d('cake_console', 'CamelCased name of the plugin to create.') )); } diff --git a/cake/console/shells/tasks/project.php b/lib/Cake/Console/Command/Task/ProjectTask.php similarity index 69% rename from cake/console/shells/tasks/project.php rename to lib/Cake/Console/Command/Task/ProjectTask.php index ac9cd5b59..dd02e8170 100644 --- a/cake/console/shells/tasks/project.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -17,7 +17,10 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'File'); + +App::uses('File', 'Utility'); +App::uses('String', 'Utility'); +App::uses('Security', 'Utility'); /** * Task class for creating new project apps and plugins @@ -49,16 +52,8 @@ class ProjectTask extends Shell { $project = $_SERVER['PWD'] . DS . $project; } - if (empty($this->params['skel'])) { - $core = App::core('shells'); - $skelPath = dirname($core[0]) . DS . 'templates' . DS . 'skel'; - if (is_dir($skelPath) === true) { - $this->params['skel'] = $skelPath; - } - } - while (!$project) { - $prompt = __("What is the full path for this app including the app directory name?\n Example:"); + $prompt = __d('cake_console', "What is the full path for this app including the app directory name?\n Example:"); $default = APP_PATH . 'myapp'; $project = $this->in($prompt . $default, null, $default); } @@ -66,7 +61,7 @@ class ProjectTask extends Shell { if ($project) { $response = false; while ($response == false && is_dir($project) === true && file_exists($project . 'config' . 'core.php')) { - $prompt = __('A project already exists in this location: %s Overwrite?', $project); + $prompt = __d('cake_console', 'A project already exists in this location: %s Overwrite?', $project); $response = $this->in($prompt, array('y','n'), 'n'); if (strtolower($response) === 'n') { $response = $project = false; @@ -78,51 +73,51 @@ class ProjectTask extends Shell { if ($this->bake($project)) { $path = Folder::slashTerm($project); if ($this->createHome($path)) { - $this->out(__(' * Welcome page created')); + $this->out(__d('cake_console', ' * Welcome page created')); } else { - $this->err(__('The Welcome page was NOT created')); + $this->err(__d('cake_console', 'The Welcome page was NOT created')); $success = false; } if ($this->securitySalt($path) === true) { - $this->out(__(' * Random hash key created for \'Security.salt\'')); + $this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\'')); } else { - $this->err(__('Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIGS . 'core.php')); + $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIGS . 'core.php')); $success = false; } if ($this->securityCipherSeed($path) === true) { - $this->out(__(' * Random seed created for \'Security.cipherSeed\'')); + $this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\'')); } else { - $this->err(__('Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIGS . 'core.php')); + $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIGS . 'core.php')); $success = false; } if ($this->corePath($path) === true) { - $this->out(__(' * CAKE_CORE_INCLUDE_PATH set to %s in webroot/index.php', CAKE_CORE_INCLUDE_PATH)); - $this->out(__(' * CAKE_CORE_INCLUDE_PATH set to %s in webroot/test.php', CAKE_CORE_INCLUDE_PATH)); - $this->out(__(' * Remember to check these value after moving to production server')); + $this->out(__d('cake_console', ' * CAKE_CORE_INCLUDE_PATH set to %s in webroot/index.php', CAKE_CORE_INCLUDE_PATH)); + $this->out(__d('cake_console', ' * CAKE_CORE_INCLUDE_PATH set to %s in webroot/test.php', CAKE_CORE_INCLUDE_PATH)); + $this->out(__d('cake_console', ' * Remember to check these value after moving to production server')); } else { - $this->err(__('Unable to set CAKE_CORE_INCLUDE_PATH, you should change it in %s', $path . 'webroot' .DS .'index.php')); + $this->err(__d('cake_console', 'Unable to set CAKE_CORE_INCLUDE_PATH, you should change it in %s', $path . 'webroot' .DS .'index.php')); $success = false; } if ($this->consolePath($path) === true) { - $this->out(__(' * app/console/cake.php path set.')); + $this->out(__d('cake_console', ' * app/Console/cake.php path set.')); } else { - $this->err(__('Unable to set console path for app/console.')); + $this->err(__d('cake_console', 'Unable to set console path for app/Console.')); $success = false; } $Folder = new Folder($path); if (!$Folder->chmod($path . 'tmp', 0777)) { - $this->err(__('Could not set permissions on %s', $path . DS .'tmp')); - $this->out(__('chmod -R 0777 %s', $path . DS .'tmp')); + $this->err(__d('cake_console', 'Could not set permissions on %s', $path . DS .'tmp')); + $this->out(__d('cake_console', 'chmod -R 0777 %s', $path . DS .'tmp')); $success = false; } if ($success) { - $this->out(__('Project baked successfully!')); + $this->out(__d('cake_console', 'Project baked successfully!')); } else { - $this->out(__('Project baked but with some issues..')); + $this->out(__d('cake_console', 'Project baked but with some issues..')); } return $path; } @@ -144,23 +139,23 @@ class ProjectTask extends Shell { $skel = $this->params['skel']; } while (!$skel) { - $skel = $this->in(__("What is the path to the directory layout you wish to copy?\nExample: %s", APP, null, ROOT . DS . 'myapp' . DS)); + $skel = $this->in(__d('cake_console', "What is the path to the directory layout you wish to copy?\nExample: %s", APP, null, ROOT . DS . 'myapp' . DS)); if ($skel == '') { - $this->err(__('The directory path you supplied was empty. Please try again.')); + $this->err(__d('cake_console', 'The directory path you supplied was empty. Please try again.')); } else { while (is_dir($skel) === false) { - $skel = $this->in(__('Directory path does not exist please choose another:')); + $skel = $this->in(__d('cake_console', 'Directory path does not exist please choose another:')); } } } $app = basename($path); - $this->out(__('Skel Directory: ') . $skel); - $this->out(__('Will be copied to: ') . $path); + $this->out(__d('cake_console', 'Skel Directory: ') . $skel); + $this->out(__d('cake_console', 'Will be copied to: ') . $path); $this->hr(); - $looksGood = $this->in(__('Look okay?'), array('y', 'n', 'q'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n', 'q'), 'y'); if (strtolower($looksGood) == 'y') { $Folder = new Folder($skel); @@ -170,10 +165,10 @@ class ProjectTask extends Shell { if ($Folder->copy(array('to' => $path, 'skip' => $skip))) { $this->hr(); - $this->out(__('Created: %s in %s', $app, $path)); + $this->out(__d('cake_console', 'Created: %s in %s', $app, $path)); $this->hr(); } else { - $this->err(__("Could not create '%s' properly.", $app)); + $this->err(__d('cake_console', "Could not create '%s' properly.", $app)); return false; } @@ -183,7 +178,7 @@ class ProjectTask extends Shell { return true; } elseif (strtolower($looksGood) == 'q') { - $this->out(__('Bake Aborted.')); + $this->out(__d('cake_console', 'Bake Aborted.')); } else { $this->execute(false); return false; @@ -199,7 +194,7 @@ class ProjectTask extends Shell { public function createHome($dir) { $app = basename($dir); $path = $dir . 'views' . DS . 'pages' . DS; - $source = CAKE . 'console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp'; + $source = LIBS . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp'; include($source); return $this->createFile($path.'home.ctp', $output); } @@ -212,10 +207,10 @@ class ProjectTask extends Shell { * @return boolean success */ public function consolePath($path) { - $File = new File($path . 'console' . DS . 'cake.php'); + $File = new File($path . 'Console' . DS . 'cake.php'); $contents = $File->read(); if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) { - $path = CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS; + $path = LIBS . 'Console' . DS; $replacement = "'" . str_replace(DS, "' . DIRECTORY_SEPARATOR . '", $path) . "'"; $result = str_replace($match[0], $replacement, $contents); if ($File->write($result)) { @@ -236,9 +231,6 @@ class ProjectTask extends Shell { $File = new File($path . 'config' . DS . 'core.php'); $contents = $File->read(); if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) { - if (!class_exists('Security')) { - require LIBS . 'security.php'; - } $string = Security::generateAuthKey(); $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents); if ($File->write($result)) { @@ -260,7 +252,7 @@ class ProjectTask extends Shell { $contents = $File->read(); if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) { if (!class_exists('Security')) { - require LIBS . 'security.php'; + require LIBS . 'Utility' . DS . 'security.php'; } $string = substr(bin2hex(Security::generateAuthKey()), 0, 30); $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents); @@ -343,7 +335,7 @@ class ProjectTask extends Shell { } if ($this->interactive) { $this->out(); - $this->out(__('You have more than one routing prefix configured')); + $this->out(__d('cake_console', 'You have more than one routing prefix configured')); } $options = array(); foreach ($prefixes as $i => $prefix) { @@ -352,19 +344,19 @@ class ProjectTask extends Shell { $this->out($i + 1 . '. ' . $prefix); } } - $selection = $this->in(__('Please choose a prefix to bake with.'), $options, 1); + $selection = $this->in(__d('cake_console', 'Please choose a prefix to bake with.'), $options, 1); return $prefixes[$selection - 1] . '_'; } if ($this->interactive) { $this->hr(); $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); - $this->out(__('What would you like the prefix route to be?')); - $this->out(__('Example: www.example.com/admin/controller')); + $this->out(__d('cake_console', 'What would you like the prefix route to be?')); + $this->out(__d('cake_console', 'Example: www.example.com/admin/controller')); while ($admin == '') { - $admin = $this->in(__('Enter a routing prefix:'), null, 'admin'); + $admin = $this->in(__d('cake_console', 'Enter a routing prefix:'), null, 'admin'); } if ($this->cakeAdmin($admin) !== true) { - $this->out(__('Unable to write to /app/config/core.php.')); + $this->out(__d('cake_console', 'Unable to write to /app/config/core.php.')); $this->out('You need to enable Configure::write(\'Routing.prefixes\',array(\'admin\')) in /app/config/core.php to use prefix routing.'); $this->_stop(); } @@ -381,13 +373,14 @@ class ProjectTask extends Shell { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Generate a new CakePHP project skeleton.') + __d('cake_console', 'Generate a new CakePHP project skeleton.') )->addArgument('name', array( - 'help' => __('Application directory to make, if it starts with "/" the path is absolute.') + 'help' => __d('cake_console', 'Application directory to make, if it starts with "/" the path is absolute.') ))->addOption('empty', array( - 'help' => __('Create empty files in each of the directories. Good if you are using git') + 'help' => __d('cake_console', 'Create empty files in each of the directories. Good if you are using git') ))->addOption('skel', array( - 'help' => __('The directory layout to use for the new application skeleton. Defaults to cake/console/templates/skel of CakePHP used to create the project.') + 'default' => current(App::core('Console')) . DS . 'templates' . DS . 'skel', + 'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/console/templates/skel of CakePHP used to create the project.') )); } diff --git a/cake/console/shells/tasks/template.php b/lib/Cake/Console/Command/Task/TemplateTask.php similarity index 92% rename from cake/console/shells/tasks/template.php rename to lib/Cake/Console/Command/Task/TemplateTask.php index d23fc21d1..189cf7f83 100644 --- a/cake/console/shells/tasks/template.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -16,7 +16,8 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Folder'); + +App::uses('Folder', 'Utility'); class TemplateTask extends Shell { @@ -53,8 +54,8 @@ class TemplateTask extends Shell { * @return array Array of bake themes that are installed. */ protected function _findThemes() { - $paths = App::path('shells'); - $core = array_pop($paths); + $paths = App::path('Console'); + $core = current(App::core('Console')); $separator = DS === '/' ? '/' : '\\\\'; $core = preg_replace('#shells' . $separator . '$#', '', $core); @@ -169,8 +170,8 @@ class TemplateTask extends Shell { } $this->hr(); - $this->out(__('You have more than one set of templates installed.')); - $this->out(__('Please choose the template set you wish to use:')); + $this->out(__d('cake_console', 'You have more than one set of templates installed.')); + $this->out(__d('cake_console', 'Please choose the template set you wish to use:')); $this->hr(); $i = 1; @@ -180,7 +181,7 @@ class TemplateTask extends Shell { $indexedPaths[$i] = $path; $i++; } - $index = $this->in(__('Which bake theme would you like to use?'), range(1, $i - 1), 1); + $index = $this->in(__d('cake_console', 'Which bake theme would you like to use?'), range(1, $i - 1), 1); $themeNames = array_keys($this->templatePaths); $this->params['theme'] = $themeNames[$index - 1]; return $indexedPaths[$index]; @@ -207,7 +208,7 @@ class TemplateTask extends Shell { return $templatePath; } } - $this->err(__('Could not find template for %s', $filename)); + $this->err(__d('cake_console', 'Could not find template for %s', $filename)); return false; } } diff --git a/cake/console/shells/tasks/test.php b/lib/Cake/Console/Command/Task/TestTask.php similarity index 79% rename from cake/console/shells/tasks/test.php rename to lib/Cake/Console/Command/Task/TestTask.php index 21b57b22a..56ecd502e 100644 --- a/cake/console/shells/tasks/test.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -17,8 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'bake.php'; -App::import('Model', 'ClassRegistry'); +App::uses('BakeTask', 'Console/Command/Task'); +App::uses('ClassRegistry', 'Utility'); /** * Task class for creating and updating test files. @@ -49,7 +49,13 @@ class TestTask extends BakeTask { * @var array * @access public */ - public $classTypes = array('Model', 'Controller', 'Component', 'Behavior', 'Helper'); + public $classTypes = array( + 'Model' => 'Model', + 'Controller' => 'Controller', + 'Component' => 'Controller/Component', + 'Behavior' => 'Model/Behavior', + 'Helper' => 'View/Helper' + ); /** * Internal list of fixtures that have been added so far. @@ -89,14 +95,14 @@ class TestTask extends BakeTask { protected function _interactive($type = null) { $this->interactive = true; $this->hr(); - $this->out(__('Bake Tests')); - $this->out(__('Path: %s', $this->path)); + $this->out(__d('cake_console', 'Bake Tests')); + $this->out(__d('cake_console', 'Path: %s', $this->path)); $this->hr(); if ($type) { $type = Inflector::camelize($type); - if (!in_array($type, $this->classTypes)) { - $this->error(__('Incorrect type provided. Please choose one of %s', implode(', ', $this->classTypes))); + if (!isset($this->classTypes[$type])) { + $this->error(__d('cake_console', 'Incorrect type provided. Please choose one of %s', implode(', ', array_keys($this->classTypes)))); } } else { $type = $this->getObjectType(); @@ -113,13 +119,17 @@ class TestTask extends BakeTask { */ public function bake($type, $className) { if ($this->typeCanDetectFixtures($type) && $this->isLoadableClass($type, $className)) { - $this->out(__('Bake is detecting possible fixtures...')); + $this->out(__d('cake_console', 'Bake is detecting possible fixtures...')); $testSubject = $this->buildTestSubject($type, $className); $this->generateFixtureList($testSubject); } elseif ($this->interactive) { $this->getUserFixtures(); } - $fullClassName = $this->getRealClassName($type, $className); + $fullClassName = $className; + + if (!$this->interactive) { + $fullClassName = $this->getRealClassName($type, $className); + } $methods = array(); if (class_exists($fullClassName)) { @@ -154,20 +164,22 @@ class TestTask extends BakeTask { */ public function getObjectType() { $this->hr(); - $this->out(__('Select an object type:')); + $this->out(__d('cake_console', 'Select an object type:')); $this->hr(); $keys = array(); - foreach ($this->classTypes as $key => $option) { - $this->out(++$key . '. ' . $option); - $keys[] = $key; + $i = 0; + foreach ($this->classTypes as $option => $package) { + $this->out(++$i . '. ' . $option); + $keys[] = $i; } $keys[] = 'q'; - $selection = $this->in(__('Enter the type of object to bake a test for or (q)uit'), $keys, 'q'); + $selection = $this->in(__d('cake_console', 'Enter the type of object to bake a test for or (q)uit'), $keys, 'q'); if ($selection == 'q') { return $this->_stop(); } - return $this->classTypes[$selection - 1]; + $types = array_keys($this->classTypes); + return $types[$selection - 1]; } /** @@ -181,23 +193,24 @@ class TestTask extends BakeTask { if ($this->plugin) { $path = Inflector::pluralize($type); if ($type === 'helper') { - $path = 'views' . DS . $path; + $path = 'View/Helper'; } elseif ($type === 'component') { - $path = 'controllers' . DS . $path; + $path = 'Controller/Component'; } elseif ($type === 'behavior') { - $path = 'models' . DS . $path; + $path = 'Model/Behavior'; } - $options = App::objects($type, App::pluginPath($this->plugin) . $path, false); + $plugin = $this->plugin . '.'; + $options = App::objects($plugin . $type); } else { $options = App::objects($type); } - $this->out(__('Choose a %s class', $objectType)); + $this->out(__d('cake_console', 'Choose a %s class', $objectType)); $keys = array(); foreach ($options as $key => $option) { $this->out(++$key . '. ' . $option); $keys[] = $key; } - $selection = $this->in(__('Choose an existing class, or enter the name of a class that does not exist')); + $selection = $this->in(__d('cake_console', 'Choose an existing class, or enter the name of a class that does not exist')); if (isset($options[$selection - 1])) { return $options[$selection - 1]; } @@ -256,7 +269,7 @@ class TestTask extends BakeTask { * @return string Real classname */ public function getRealClassName($type, $class) { - if (strtolower($type) == 'model') { + if (strtolower($type) == 'model' || empty($this->classTypes[$type])) { return $class; } return $class . $type; @@ -365,10 +378,10 @@ class TestTask extends BakeTask { * @return array Array of fixtures the user wants to add. */ public function getUserFixtures() { - $proceed = $this->in(__('Bake could not detect fixtures, would you like to add some?'), array('y','n'), 'n'); + $proceed = $this->in(__d('cake_console', 'Bake could not detect fixtures, would you like to add some?'), array('y','n'), 'n'); $fixtures = array(); if (strtolower($proceed) == 'y') { - $fixtureList = $this->in(__("Please provide a comma separated list of the fixtures names you'd like to use.\nExample: 'app.comment, app.post, plugin.forums.post'")); + $fixtureList = $this->in(__d('cake_console', "Please provide a comma separated list of the fixtures names you'd like to use.\nExample: 'app.comment, app.post, plugin.forums.post'")); $fixtureListTrimmed = str_replace(' ', '', $fixtureList); $fixtures = explode(',', $fixtureListTrimmed); } @@ -416,12 +429,14 @@ class TestTask extends BakeTask { * @return string filename the test should be created on. */ public function testCaseFileName($type, $className) { - $path = $this->getPath();; - $path .= 'cases' . DS . strtolower($type) . 's' . DS; - if (strtolower($type) == 'controller') { + $path = $this->getPath() . 'Case' . DS; + if (isset($this->classTypes[$type])) { + $path .= $this->classTypes[$type] . DS; + } + if (!$this->interactive) { $className = $this->getRealClassName($type, $className); } - return $path . Inflector::underscore($className) . '.test.php'; + return $path . Inflector::camelize($className) . 'Test.php'; } /** @@ -431,15 +446,29 @@ class TestTask extends BakeTask { */ public function getOptionParser() { $parser = parent::getOptionParser(); - return $parser->description(__('Bake test case skeletons for classes.')) + return $parser->description(__d('cake_console', 'Bake test case skeletons for classes.')) ->addArgument('type', array( - 'help' => __('Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), + 'help' => __d('cake_console', 'Type of class to bake, can be any of the following: controller, model, helper, component or behavior.'), 'choices' => array('controller', 'model', 'helper', 'component', 'behavior') ))->addArgument('name', array( - 'help' => __('An existing class to bake tests for.') + 'help' => __d('cake_console', 'An existing class to bake tests for.') ))->addOption('plugin', array( 'short' => 'p', - 'help' => __('CamelCased name of the plugin to bake tests for.') - ))->epilog(__('Omitting all arguments and options will enter into an interactive mode.')); + 'help' => __d('cake_console', 'CamelCased name of the plugin to bake tests for.') + ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.')); + } + +/** + * Gets the path for output. Checks the plugin property + * and returns the correct path. + * + * @return string Path to output. + */ + public function getPath() { + $path = $this->path; + if (isset($this->plugin)) { + $path = $this->_pluginPath($this->plugin) . 'tests' . DS; + } + return $path; } } diff --git a/cake/console/shells/tasks/view.php b/lib/Cake/Console/Command/Task/ViewTask.php similarity index 80% rename from cake/console/shells/tasks/view.php rename to lib/Cake/Console/Command/Task/ViewTask.php index c835735de..5e9a78c50 100644 --- a/cake/console/shells/tasks/view.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -16,8 +16,9 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'Controller', false); -include_once dirname(__FILE__) . DS . 'bake.php'; + +App::uses('Controller', 'Controller'); +App::uses('BakeTask', 'Console/Command/Task'); /** * Task class for creating and updating view files. @@ -146,7 +147,7 @@ class ViewTask extends BakeTask { protected function _methodsToBake() { $methods = array_diff( array_map('strtolower', get_class_methods($this->controllerName . 'Controller')), - array_map('strtolower', get_class_methods('appcontroller')) + array_map('strtolower', get_class_methods('AppController')) ); $scaffoldActions = false; if (empty($methods)) { @@ -188,7 +189,8 @@ class ViewTask extends BakeTask { $model = $this->_modelName($table); $this->controllerName = $this->_controllerName($model); $this->controllerPath = Inflector::underscore($this->controllerName); - if (App::import('Model', $model)) { + App::uses($model, 'Model'); + if (class_exists($model)) { $vars = $this->__loadController(); if (!$actions) { $actions = $this->_methodsToBake(); @@ -219,17 +221,17 @@ class ViewTask extends BakeTask { $this->controllerPath = strtolower(Inflector::underscore($this->controllerName)); - $prompt = __("Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", $this->controllerName); + $prompt = __d('cake_console', "Would you like bake to build your views interactively?\nWarning: Choosing no will overwrite %s views if it exist.", $this->controllerName); $interactive = $this->in($prompt, array('y', 'n'), 'n'); if (strtolower($interactive) == 'n') { $this->interactive = false; } - $prompt = __("Would you like to create some CRUD views\n(index, add, view, edit) for this controller?\nNOTE: Before doing so, you'll need to create your controller\nand model classes (including associated models)."); + $prompt = __d('cake_console', "Would you like to create some CRUD views\n(index, add, view, edit) for this controller?\nNOTE: Before doing so, you'll need to create your controller\nand model classes (including associated models)."); $wannaDoScaffold = $this->in($prompt, array('y','n'), 'y'); - $wannaDoAdmin = $this->in(__("Would you like to create the views for admin routing?"), array('y','n'), 'n'); + $wannaDoAdmin = $this->in(__d('cake_console', "Would you like to create the views for admin routing?"), array('y','n'), 'n'); if (strtolower($wannaDoScaffold) == 'y' || strtolower($wannaDoAdmin) == 'y') { $vars = $this->__loadController(); @@ -248,7 +250,7 @@ class ViewTask extends BakeTask { } $this->hr(); $this->out(); - $this->out(__("View Scaffolding Complete.\n")); + $this->out(__d('cake_console', "View Scaffolding Complete.\n")); } else { $this->customAction(); } @@ -266,20 +268,21 @@ class ViewTask extends BakeTask { */ private function __loadController() { if (!$this->controllerName) { - $this->err(__('Controller not found')); + $this->err(__d('cake_console', 'Controller not found')); } - $import = $this->controllerName; + $plugin = null; if ($this->plugin) { - $import = $this->plugin . '.' . $this->controllerName; + $plugin = $this->plugin . '.'; } - if (!App::import('Controller', $import)) { - $file = $this->controllerPath . '_controller.php'; - $this->err(__("The file '%s' could not be found.\nIn order to bake a view, you'll need to first create the controller.", $file)); + $controllerClassName = $this->controllerName . 'Controller'; + App::uses($controllerClassName, $plugin . 'Controller'); + if (!class_exists($controllerClassName)) { + $file = $controllerClassName . '.php'; + $this->err(__d('cake_console', "The file '%s' could not be found.\nIn order to bake a view, you'll need to first create the controller.", $file)); $this->_stop(); } - $controllerClassName = $this->controllerName . 'Controller'; $controllerObj = new $controllerClassName(); $controllerObj->plugin = $this->plugin; $controllerObj->constructClasses(); @@ -328,25 +331,25 @@ class ViewTask extends BakeTask { public function customAction() { $action = ''; while ($action == '') { - $action = $this->in(__('Action Name? (use lowercase_underscored function name)')); + $action = $this->in(__d('cake_console', 'Action Name? (use lowercase_underscored function name)')); if ($action == '') { - $this->out(__('The action name you supplied was empty. Please try again.')); + $this->out(__d('cake_console', 'The action name you supplied was empty. Please try again.')); } } $this->out(); $this->hr(); - $this->out(__('The following view will be created:')); + $this->out(__d('cake_console', 'The following view will be created:')); $this->hr(); - $this->out(__('Controller Name: %s', $this->controllerName)); - $this->out(__('Action Name: %s', $action)); - $this->out(__('Path: %s', $this->params['app'] . DS . $this->controllerPath . DS . Inflector::underscore($action) . ".ctp")); + $this->out(__d('cake_console', 'Controller Name: %s', $this->controllerName)); + $this->out(__d('cake_console', 'Action Name: %s', $action)); + $this->out(__d('cake_console', 'Path: %s', $this->params['app'] . DS . $this->controllerPath . DS . Inflector::underscore($action) . ".ctp")); $this->hr(); - $looksGood = $this->in(__('Look okay?'), array('y','n'), 'y'); + $looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y','n'), 'y'); if (strtolower($looksGood) == 'y') { $this->bake($action, ' '); $this->_stop(); } else { - $this->out(__('Bake Aborted.')); + $this->out(__d('cake_console', 'Bake Aborted.')); } } @@ -428,25 +431,25 @@ class ViewTask extends BakeTask { public function getOptionParser() { $parser = parent::getOptionParser(); return $parser->description( - __('Bake views for a controller, using built-in or custom templates.') + __d('cake_console', 'Bake views for a controller, using built-in or custom templates.') )->addArgument('controller', array( - 'help' => __('Name of the controller views to bake. Can be Plugin.name as a shortcut for plugin baking.') + 'help' => __d('cake_console', 'Name of the controller views to bake. Can be Plugin.name as a shortcut for plugin baking.') ))->addArgument('action', array( - 'help' => __("Will bake a single action's file. core templates are (index, add, edit, view)") + 'help' => __d('cake_console', "Will bake a single action's file. core templates are (index, add, edit, view)") ))->addArgument('alias', array( - 'help' => __('Will bake the template in but create the filename after .') + 'help' => __d('cake_console', 'Will bake the template in but create the filename after .') ))->addOption('plugin', array( 'short' => 'p', - 'help' => __('Plugin to bake the view into.') + 'help' => __d('cake_console', 'Plugin to bake the view into.') ))->addOption('admin', array( - 'help' => __('Set to only bake views for a prefix in Routing.prefixes'), + 'help' => __d('cake_console', 'Set to only bake views for a prefix in Routing.prefixes'), 'boolean' => true ))->addOption('connection', array( 'short' => 'c', - 'help' => __('The connection the connected model is on.') + 'help' => __d('cake_console', 'The connection the connected model is on.') ))->addSubcommand('all', array( - 'help' => __('Bake all CRUD action views for all controllers. Requires models and controllers to exist.') - ))->epilog(__('Omitting all arguments and options will enter into an interactive mode.')); + 'help' => __d('cake_console', 'Bake all CRUD action views for all controllers. Requires models and controllers to exist.') + ))->epilog(__d('cake_console', 'Omitting all arguments and options will enter into an interactive mode.')); } /** diff --git a/cake/console/shells/testsuite.php b/lib/Cake/Console/Command/TestsuiteShell.php similarity index 65% rename from cake/console/shells/testsuite.php rename to lib/Cake/Console/Command/TestsuiteShell.php index b7b588e06..d0d778484 100644 --- a/cake/console/shells/testsuite.php +++ b/lib/Cake/Console/Command/TestsuiteShell.php @@ -18,7 +18,13 @@ * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -class TestSuiteShell extends Shell { + +App::uses('Shell', 'Console'); +App::uses('CakeTestSuiteDispatcher', 'TestSuite'); +App::uses('CakeTestSuiteCommand', 'TestSuite'); +App::uses('CakeTestLoader', 'TestSuite'); + +class TestsuiteShell extends Shell { /** * Dispatcher object for the run. @@ -38,113 +44,113 @@ class TestSuiteShell extends Shell { 'The CakePHP Testsuite allows you to run test cases from the command line', 'If run with no command line arguments, a list of available core test cases will be shown' ))->addArgument('category', array( - 'help' => __('app, core or name of a plugin.'), + 'help' => __d('cake_console', 'app, core or name of a plugin.'), 'required' => true ))->addArgument('file', array( - 'help' => __('file name with folder prefix and without the test.php suffix.'), + 'help' => __d('cake_console', 'file name with folder prefix and without the test.php suffix.'), 'required' => false, ))->addOption('log-junit', array( - 'help' => __(' Log test execution in JUnit XML format to file.'), + 'help' => __d('cake_console', ' Log test execution in JUnit XML format to file.'), 'default' => false ))->addOption('log-json', array( - 'help' => __(' Log test execution in TAP format to file.'), + 'help' => __d('cake_console', ' Log test execution in TAP format to file.'), 'default' => false ))->addOption('log-tap', array( - 'help' => __(' Log test execution in TAP format to file.'), + 'help' => __d('cake_console', ' Log test execution in TAP format to file.'), 'default' => false ))->addOption('log-dbus', array( - 'help' => __('Log test execution to DBUS.'), + 'help' => __d('cake_console', 'Log test execution to DBUS.'), 'default' => false ))->addOption('coverage-html', array( - 'help' => __(' Generate code coverage report in HTML format.'), + 'help' => __d('cake_console', ' Generate code coverage report in HTML format.'), 'default' => false ))->addOption('coverage-clover', array( - 'help' => __(' Write code coverage data in Clover XML format.'), + 'help' => __d('cake_console', ' Write code coverage data in Clover XML format.'), 'default' => false ))->addOption('testdox-html', array( - 'help' => __(' Write agile documentation in HTML format to file.'), + 'help' => __d('cake_console', ' Write agile documentation in HTML format to file.'), 'default' => false ))->addOption('testdox-text', array( - 'help' => __(' Write agile documentation in Text format to file.'), + 'help' => __d('cake_console', ' Write agile documentation in Text format to file.'), 'default' => false ))->addOption('filter', array( - 'help' => __(' Filter which tests to run.'), + 'help' => __d('cake_console', ' Filter which tests to run.'), 'default' => false ))->addOption('group', array( - 'help' => __(' Only runs tests from the specified group(s).'), + 'help' => __d('cake_console', ' Only runs tests from the specified group(s).'), 'default' => false ))->addOption('exclude-group', array( - 'help' => __(' Exclude tests from the specified group(s).'), + 'help' => __d('cake_console', ' Exclude tests from the specified group(s).'), 'default' => false ))->addOption('list-groups', array( - 'help' => __('List available test groups.'), + 'help' => __d('cake_console', 'List available test groups.'), 'boolean' => true ))->addOption('loader', array( - 'help' => __('TestSuiteLoader implementation to use.'), + 'help' => __d('cake_console', 'TestSuiteLoader implementation to use.'), 'default' => false ))->addOption('repeat', array( - 'help' => __(' Runs the test(s) repeatedly.'), + 'help' => __d('cake_console', ' Runs the test(s) repeatedly.'), 'default' => false ))->addOption('tap', array( - 'help' => __('Report test execution progress in TAP format.'), + 'help' => __d('cake_console', 'Report test execution progress in TAP format.'), 'boolean' => true ))->addOption('testdox', array( - 'help' => __('Report test execution progress in TestDox format.'), + 'help' => __d('cake_console', 'Report test execution progress in TestDox format.'), 'default' => false, 'boolean' => true ))->addOption('no-colors', array( - 'help' => __('Do not use colors in output.'), + 'help' => __d('cake_console', 'Do not use colors in output.'), 'boolean' => true ))->addOption('stderr', array( - 'help' => __('Write to STDERR instead of STDOUT.'), + 'help' => __d('cake_console', 'Write to STDERR instead of STDOUT.'), 'boolean' => true ))->addOption('stop-on-error', array( - 'help' => __('Stop execution upon first error or failure.'), + 'help' => __d('cake_console', 'Stop execution upon first error or failure.'), 'boolean' => true ))->addOption('stop-on-failure', array( - 'help' => __('Stop execution upon first failure.'), + 'help' => __d('cake_console', 'Stop execution upon first failure.'), 'boolean' => true ))->addOption('stop-on-skipped ', array( - 'help' => __('Stop execution upon first skipped test.'), + 'help' => __d('cake_console', 'Stop execution upon first skipped test.'), 'boolean' => true ))->addOption('stop-on-incomplete', array( - 'help' => __('Stop execution upon first incomplete test.'), + 'help' => __d('cake_console', 'Stop execution upon first incomplete test.'), 'boolean' => true ))->addOption('strict', array( - 'help' => __('Mark a test as incomplete if no assertions are made.'), + 'help' => __d('cake_console', 'Mark a test as incomplete if no assertions are made.'), 'boolean' => true ))->addOption('wait', array( - 'help' => __('Waits for a keystroke after each test.'), + 'help' => __d('cake_console', 'Waits for a keystroke after each test.'), 'boolean' => true ))->addOption('process-isolation', array( - 'help' => __('Run each test in a separate PHP process.'), + 'help' => __d('cake_console', 'Run each test in a separate PHP process.'), 'boolean' => true ))->addOption('no-globals-backup', array( - 'help' => __('Do not backup and restore $GLOBALS for each test.'), + 'help' => __d('cake_console', 'Do not backup and restore $GLOBALS for each test.'), 'boolean' => true ))->addOption('static-backup ', array( - 'help' => __('Backup and restore static attributes for each test.'), + 'help' => __d('cake_console', 'Backup and restore static attributes for each test.'), 'boolean' => true ))->addOption('syntax-check', array( - 'help' => __('Try to check source files for syntax errors.'), + 'help' => __d('cake_console', 'Try to check source files for syntax errors.'), 'boolean' => true ))->addOption('bootstrap', array( - 'help' => __(' A "bootstrap" PHP file that is run before the tests.'), + 'help' => __d('cake_console', ' A "bootstrap" PHP file that is run before the tests.'), 'default' => false - ))->addOption('configuraion', array( - 'help' => __(' Read configuration from XML file.'), + ))->addOption('configuration', array( + 'help' => __d('cake_console', ' Read configuration from XML file.'), 'default' => false ))->addOption('no-configuration', array( - 'help' => __('Ignore default configuration file (phpunit.xml).'), + 'help' => __d('cake_console', 'Ignore default configuration file (phpunit.xml).'), 'boolean' => true ))->addOption('include-path', array( - 'help' => __(' Prepend PHP include_path with given path(s).'), + 'help' => __d('cake_console', ' Prepend PHP include_path with given path(s).'), 'default' => false ))->addOption('directive', array( - 'help' => __('key[=value] Sets a php.ini value.'), + 'help' => __d('cake_console', 'key[=value] Sets a php.ini value.'), 'default' => false ))->addOption('fixture', array( - 'help' => __('Choose a custom fixture manager.'), + 'help' => __d('cake_console', 'Choose a custom fixture manager.'), )); return $parser; @@ -156,18 +162,8 @@ class TestSuiteShell extends Shell { * @return void */ public function initialize() { - require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_suite_dispatcher.php'; - - $corePath = App::core('cake'); - if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); - } else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); - } - $this->_dispatcher = new CakeTestSuiteDispatcher(); $this->_dispatcher->loadTestFramework(); - require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_suite_command.php'; } /** @@ -197,7 +193,7 @@ class TestSuiteShell extends Shell { } if (isset($this->args[1])) { - $params['case'] = Inflector::underscore($this->args[1]); + $params['case'] = $this->args[1]; } return $params; } @@ -236,7 +232,7 @@ class TestSuiteShell extends Shell { * @return void */ public function main() { - $this->out(__('CakePHP Test Shell')); + $this->out(__d('cake_console', 'CakePHP Test Shell')); $this->hr(); $args = $this->parseArgs(); @@ -256,7 +252,6 @@ class TestSuiteShell extends Shell { * @return void */ protected function run($runnerArgs, $options = array()) { - restore_error_handler(); restore_error_handler(); @@ -286,7 +281,7 @@ class TestSuiteShell extends Shell { } if (empty($testCases)) { - $this->out(__("No test cases available \n\n")); + $this->out(__d('cake_console', "No test cases available \n\n")); return $this->out($this->OptionParser->help()); } @@ -294,15 +289,15 @@ class TestSuiteShell extends Shell { $i = 1; $cases = array(); foreach ($testCases as $testCaseFile => $testCase) { - $case = explode(DS, str_replace('.test.php', '', $testCase)); - $case[count($case) - 1] = Inflector::camelize($case[count($case) - 1]); + $case = explode(DS, str_replace('Test.php', '', $testCase)); + $case[count($case) - 1] = $case[count($case) - 1]; $case = implode('/', $case); $this->out("[$i] $case"); $cases[$i] = $case; $i++; } - while ($choice = $this->in(__('What test case would you like to run?'), null, 'q')) { + while ($choice = $this->in(__d('cake_console', 'What test case would you like to run?'), null, 'q')) { if (is_numeric($choice) && isset($cases[$choice])) { $this->args[0] = $category; $this->args[1] = $cases[$choice]; diff --git a/cake/console/libs/console_error_handler.php b/lib/Cake/Console/ConsoleErrorHandler.php similarity index 87% rename from cake/console/libs/console_error_handler.php rename to lib/Cake/Console/ConsoleErrorHandler.php index 80136bbcf..9020bd1be 100644 --- a/cake/console/libs/console_error_handler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -16,8 +16,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'ErrorHandler'); -require_once 'console_output.php'; +App::uses('ErrorHandler', 'Error'); +App::uses('ConsoleOutput', 'Console'); +App::uses('CakeLog', 'Log'); /** * Error Handler for Cake console. Does simple printing of the @@ -57,7 +58,7 @@ class ConsoleErrorHandler extends ErrorHandler { public static function handleException(Exception $exception) { $stderr = self::getStderr(); $stderr->write(sprintf( - __("Error: %s\n%s"), + __d('cake_console', "Error: %s\n%s"), $exception->getMessage(), $exception->getTraceAsString() )); @@ -79,11 +80,10 @@ class ConsoleErrorHandler extends ErrorHandler { } $stderr = self::getStderr(); list($name, $log) = self::_mapErrorCode($code); - $message = __('%s in [%s, line %s]', $description, $file, $line); - $stderr->write(__("%s Error: %s\n", $name, $message)); + $message = __d('cake_console', '%s in [%s, line %s]', $description, $file, $line); + $stderr->write(__d('cake_console', "%s Error: %s\n", $name, $message)); if (Configure::read('debug') == 0) { - App::import('Core', 'CakeLog'); CakeLog::write($log, $message); } } diff --git a/cake/console/libs/console_input.php b/lib/Cake/Console/ConsoleInput.php similarity index 100% rename from cake/console/libs/console_input.php rename to lib/Cake/Console/ConsoleInput.php diff --git a/cake/console/libs/console_input_argument.php b/lib/Cake/Console/ConsoleInputArgument.php similarity index 93% rename from cake/console/libs/console_input_argument.php rename to lib/Cake/Console/ConsoleInputArgument.php index 263475e9d..885ce2180 100644 --- a/cake/console/libs/console_input_argument.php +++ b/lib/Cake/Console/ConsoleInputArgument.php @@ -95,10 +95,10 @@ class ConsoleInputArgument { } $optional = ''; if (!$this->isRequired()) { - $optional = __(' (optional)'); + $optional = __d('cake_console', ' (optional)'); } if (!empty($this->_choices)) { - $optional .= __(' (choices: %s)', implode('|', $this->_choices)); + $optional .= __d('cake_console', ' (choices: %s)', implode('|', $this->_choices)); } return sprintf('%s%s%s', $name, $this->_help, $optional); } @@ -140,7 +140,7 @@ class ConsoleInputArgument { } if (!in_array($value, $this->_choices)) { throw new ConsoleException(sprintf( - __('"%s" is not a valid value for %s. Please use one of "%s"'), + __d('cake_console', '"%s" is not a valid value for %s. Please use one of "%s"'), $value, $this->_name, implode(', ', $this->_choices) )); } diff --git a/cake/console/libs/console_input_option.php b/lib/Cake/Console/ConsoleInputOption.php similarity index 94% rename from cake/console/libs/console_input_option.php rename to lib/Cake/Console/ConsoleInputOption.php index 3c9049248..61497e5e4 100644 --- a/cake/console/libs/console_input_option.php +++ b/lib/Cake/Console/ConsoleInputOption.php @@ -119,10 +119,10 @@ class ConsoleInputOption { public function help($width = 0) { $default = $short = ''; if (!empty($this->_default) && $this->_default !== true) { - $default = __(' (default: %s)', $this->_default); + $default = __d('cake_console', ' (default: %s)', $this->_default); } if (!empty($this->_choices)) { - $default .= __(' (choices: %s)', implode('|', $this->_choices)); + $default .= __d('cake_console', ' (choices: %s)', implode('|', $this->_choices)); } if (!empty($this->_short)) { $short = ', -' . $this->_short; @@ -180,7 +180,7 @@ class ConsoleInputOption { } if (!in_array($value, $this->_choices)) { throw new ConsoleException(sprintf( - __('"%s" is not a valid value for --%s. Please use one of "%s"'), + __d('cake_console', '"%s" is not a valid value for --%s. Please use one of "%s"'), $value, $this->_name, implode(', ', $this->_choices) )); } diff --git a/cake/console/libs/console_input_subcommand.php b/lib/Cake/Console/ConsoleInputSubcommand.php similarity index 100% rename from cake/console/libs/console_input_subcommand.php rename to lib/Cake/Console/ConsoleInputSubcommand.php diff --git a/cake/console/libs/console_option_parser.php b/lib/Cake/Console/ConsoleOptionParser.php similarity index 96% rename from cake/console/libs/console_option_parser.php rename to lib/Cake/Console/ConsoleOptionParser.php index a96a0759a..6c221502b 100644 --- a/cake/console/libs/console_option_parser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -16,10 +16,15 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CONSOLE_LIBS . 'console_input_option.php'; -require_once CONSOLE_LIBS . 'console_input_argument.php'; -require_once CONSOLE_LIBS . 'console_input_subcommand.php'; -require_once CONSOLE_LIBS . 'help_formatter.php'; + +App::uses('TaskCollection', 'Console'); +App::uses('ConsoleOutput', 'Console'); +App::uses('ConsoleInput', 'Console'); +App::uses('ConsoleInputSubcommand', 'Console'); +App::uses('ConsoleInputOption', 'Console'); +App::uses('ConsoleInputArgument', 'Console'); +App::uses('ConsoleOptionParser', 'Console'); +App::uses('HelpFormatter', 'Console'); /** * Handles parsing the ARGV in the command line and provides support @@ -129,11 +134,11 @@ class ConsoleOptionParser { if ($defaultOptions) { $this->addOption('verbose', array( 'short' => 'v', - 'help' => __('Enable verbose output.'), + 'help' => __d('cake_console', 'Enable verbose output.'), 'boolean' => true ))->addOption('quiet', array( 'short' => 'q', - 'help' => __('Enable quiet output.'), + 'help' => __d('cake_console', 'Enable quiet output.'), 'boolean' => true )); } @@ -456,7 +461,7 @@ class ConsoleOptionParser { foreach ($this->_args as $i => $arg) { if ($arg->isRequired() && !isset($args[$i]) && empty($params['help'])) { throw new ConsoleException( - __('Missing required arguments. %s is required.', $arg->name()) + __d('cake_console', 'Missing required arguments. %s is required.', $arg->name()) ); } } @@ -550,7 +555,7 @@ class ConsoleOptionParser { */ protected function _parseOption($name, $params) { if (!isset($this->_options[$name])) { - throw new ConsoleException(__('Unknown option `%s`', $name)); + throw new ConsoleException(__d('cake_console', 'Unknown option `%s`', $name)); } $option = $this->_options[$name]; $isBoolean = $option->isBoolean(); @@ -584,7 +589,7 @@ class ConsoleOptionParser { } $next = count($args); if (!isset($this->_args[$next])) { - throw new ConsoleException(__('Too many arguments.')); + throw new ConsoleException(__d('cake_console', 'Too many arguments.')); } if ($this->_args[$next]->validChoice($argument)) { diff --git a/cake/console/libs/console_output.php b/lib/Cake/Console/ConsoleOutput.php similarity index 100% rename from cake/console/libs/console_output.php rename to lib/Cake/Console/ConsoleOutput.php diff --git a/cake/console/libs/help_formatter.php b/lib/Cake/Console/HelpFormatter.php similarity index 97% rename from cake/console/libs/help_formatter.php rename to lib/Cake/Console/HelpFormatter.php index f454fa8b2..94a32af88 100644 --- a/cake/console/libs/help_formatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -14,7 +14,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String', false); +App::uses('String', 'Utility'); /** * HelpFormatter formats help for console shells. Can format to either @@ -69,7 +69,7 @@ class HelpFormatter { } $out[] = ''; $out[] = sprintf( - __('To see help on a subcommand use `cake %s [subcommand] --help`'), + __d('cake_console', 'To see help on a subcommand use `cake %s [subcommand] --help`'), $parser->command() ); $out[] = ''; diff --git a/cake/console/shells/shell.php b/lib/Cake/Console/Shell.php similarity index 95% rename from cake/console/shells/shell.php rename to lib/Cake/Console/Shell.php index a143ba4e9..ad5b716fa 100644 --- a/cake/console/shells/shell.php +++ b/lib/Cake/Console/Shell.php @@ -16,10 +16,13 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once CONSOLE_LIBS . 'task_collection.php'; -require_once CONSOLE_LIBS . 'console_output.php'; -require_once CONSOLE_LIBS . 'console_input.php'; -require_once CONSOLE_LIBS . 'console_option_parser.php'; + +App::uses('TaskCollection', 'Console'); +App::uses('ConsoleOutput', 'Console'); +App::uses('ConsoleInput', 'Console'); +App::uses('ConsoleInputSubcommand', 'Console'); +App::uses('ConsoleOptionParser', 'Console'); +App::uses('File', 'Utility'); /** * Base class for command-line utilities for automating programmer chores. @@ -557,7 +560,7 @@ class Shell extends Object { * @param string $message An optional error message */ public function error($title, $message = null) { - $this->err(__('Error: %s', $title)); + $this->err(__d('cake_console', 'Error: %s', $title)); if (!empty($message)) { $this->err($message); @@ -593,31 +596,27 @@ class Shell extends Object { $this->out(); if (is_file($path) && $this->interactive === true) { - $this->out(__('File `%s` exists', $path)); - $key = $this->in(__('Do you want to overwrite?'), array('y', 'n', 'q'), 'n'); + $this->out(__d('cake_console', 'File `%s` exists', $path)); + $key = $this->in(__d('cake_console', 'Do you want to overwrite?'), array('y', 'n', 'q'), 'n'); if (strtolower($key) == 'q') { - $this->out(__('Quitting.'), 2); + $this->out(__d('cake_console', 'Quitting.'), 2); $this->_stop(); } elseif (strtolower($key) != 'y') { - $this->out(__('Skip `%s`', $path), 2); + $this->out(__d('cake_console', 'Skip `%s`', $path), 2); return false; } } else { - $this->out(__('Creating file %s', $path)); - } - - if (!class_exists('File')) { - require LIBS . 'file.php'; + $this->out(__d('cake_console', 'Creating file %s', $path)); } if ($File = new File($path, true)) { $data = $File->prepare($contents); $File->write($data); - $this->out(__('Wrote `%s`', $path)); + $this->out(__d('cake_console', 'Wrote `%s`', $path)); return true; } else { - $this->err(__('Could not write to `%s`.', $path), 2); + $this->err(__d('cake_console', 'Could not write to `%s`.', $path), 2); return false; } } @@ -664,7 +663,7 @@ class Shell extends Object { * @return string Path to controller */ protected function _controllerPath($name) { - return strtolower(Inflector::underscore($name)); + return Inflector::underscore($name); } /** diff --git a/cake/console/shell_dispatcher.php b/lib/Cake/Console/ShellDispatcher.php similarity index 94% rename from cake/console/shell_dispatcher.php rename to lib/Cake/Console/ShellDispatcher.php index 45152b6cb..2bc41e66c 100644 --- a/cake/console/shell_dispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -105,7 +105,7 @@ class ShellDispatcher { if (!isset($this->args[0]) || !isset($this->params['working'])) { $message = "This file has been loaded incorrectly and cannot continue.\n" . - "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" . "(http://book.cakephp.org/)"; throw new CakeException($message); @@ -127,17 +127,17 @@ class ShellDispatcher { define('APP_PATH', $this->params['working'] . DS); define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS); if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) { - define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS); + define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS); } $boot = file_exists(ROOT . DS . APP_DIR . DS . 'config' . DS . 'bootstrap.php'); - require CORE_PATH . 'cake' . DS . 'bootstrap.php'; + require CORE_PATH . 'Cake' . DS . 'bootstrap.php'; if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) { - include_once CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php'; + include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php'; App::build(); } - require_once CONSOLE_LIBS . 'console_error_handler.php'; + require_once CONSOLE_LIBS . 'ConsoleErrorHandler.php'; set_exception_handler(array('ConsoleErrorHandler', 'handleException')); set_error_handler(array('ConsoleErrorHandler', 'handleError'), Configure::read('Error.level')); @@ -207,14 +207,14 @@ class ShellDispatcher { protected function _getShell($shell) { list($plugin, $shell) = pluginSplit($shell, true); - $loaded = App::import('Shell', $plugin . $shell); + $class = Inflector::camelize($shell) . 'Shell'; - - if (!$loaded) { - throw new MissingShellFileException(array('shell' => $shell)); - } + + App::uses('Shell', 'Console'); + App::uses($class, $plugin . 'Console/Command'); + if (!class_exists($class)) { - throw new MissingShellClassException(array('shell' => $class)); + throw new MissingShellFileException(array('shell' => $shell)); } $Shell = new $class(); return $Shell; @@ -229,9 +229,9 @@ class ShellDispatcher { $this->_parsePaths($args); $defaults = array( - 'app' => 'app', + 'app' => 'app', 'root' => dirname(dirname(dirname(__FILE__))), - 'working' => null, + 'working' => null, 'webroot' => 'webroot' ); $params = array_merge($defaults, array_intersect_key($this->params, $defaults)); diff --git a/cake/console/libs/task_collection.php b/lib/Cake/Console/TaskCollection.php similarity index 94% rename from cake/console/libs/task_collection.php rename to lib/Cake/Console/TaskCollection.php index da476f220..3c911a2ce 100644 --- a/cake/console/libs/task_collection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -15,6 +15,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('ObjectCollection', 'Utility'); + class TaskCollection extends ObjectCollection { /** * Shell to use to set params to tasks. @@ -57,10 +60,8 @@ class TaskCollection extends ObjectCollection { } $taskFile = Inflector::underscore($name); $taskClass = $name . 'Task'; + App::uses($taskClass, $plugin . 'Console/Command/Task'); if (!class_exists($taskClass)) { - if (!App::import('Shell', $plugin . $this->taskPathPrefix . $name)) { - throw new MissingTaskFileException($taskFile . '.php'); - } if (!class_exists($taskClass)) { throw new MissingTaskClassException($taskClass); } diff --git a/cake/console/cake b/lib/Cake/Console/cake similarity index 100% rename from cake/console/cake rename to lib/Cake/Console/cake diff --git a/cake/console/cake.bat b/lib/Cake/Console/cake.bat similarity index 100% rename from cake/console/cake.bat rename to lib/Cake/Console/cake.bat diff --git a/cake/console/cake.php b/lib/Cake/Console/cake.php similarity index 90% rename from cake/console/cake.php rename to lib/Cake/Console/cake.php index cb2362c39..4c8188b2c 100644 --- a/cake/console/cake.php +++ b/lib/Cake/Console/cake.php @@ -19,6 +19,6 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'shell_dispatcher.php'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'ShellDispatcher.php'); return ShellDispatcher::run($argv); diff --git a/cake/console/templates/default/actions/controller_actions.ctp b/lib/Cake/Console/templates/default/actions/controller_actions.ctp similarity index 100% rename from cake/console/templates/default/actions/controller_actions.ctp rename to lib/Cake/Console/templates/default/actions/controller_actions.ctp diff --git a/cake/console/templates/default/classes/controller.ctp b/lib/Cake/Console/templates/default/classes/controller.ctp similarity index 100% rename from cake/console/templates/default/classes/controller.ctp rename to lib/Cake/Console/templates/default/classes/controller.ctp diff --git a/cake/console/templates/default/classes/fixture.ctp b/lib/Cake/Console/templates/default/classes/fixture.ctp similarity index 100% rename from cake/console/templates/default/classes/fixture.ctp rename to lib/Cake/Console/templates/default/classes/fixture.ctp diff --git a/cake/console/templates/default/classes/model.ctp b/lib/Cake/Console/templates/default/classes/model.ctp similarity index 100% rename from cake/console/templates/default/classes/model.ctp rename to lib/Cake/Console/templates/default/classes/model.ctp diff --git a/cake/console/templates/default/classes/test.ctp b/lib/Cake/Console/templates/default/classes/test.ctp similarity index 96% rename from cake/console/templates/default/classes/test.ctp rename to lib/Cake/Console/templates/default/classes/test.ctp index 2bcce902b..331347099 100644 --- a/cake/console/templates/default/classes/test.ctp +++ b/lib/Cake/Console/templates/default/classes/test.ctp @@ -20,7 +20,7 @@ echo " -App::import('', ''); +App::uses('', ''); /** diff --git a/cake/console/templates/default/views/form.ctp b/lib/Cake/Console/templates/default/views/form.ctp similarity index 100% rename from cake/console/templates/default/views/form.ctp rename to lib/Cake/Console/templates/default/views/form.ctp diff --git a/cake/console/templates/default/views/home.ctp b/lib/Cake/Console/templates/default/views/home.ctp similarity index 67% rename from cake/console/templates/default/views/home.ctp rename to lib/Cake/Console/templates/default/views/home.ctp index 22217b2fb..b707e5eb3 100644 --- a/cake/console/templates/default/views/home.ctp +++ b/lib/Cake/Console/templates/default/views/home.ctp @@ -2,7 +2,7 @@ $output = "

Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!

\n"; $output .=" 0): Debugger::checkSecurityKeys(); endif; @@ -52,27 +52,38 @@ endif; ?>

getDataSource('default'); ?>

+ isConnected()): + echo ''; + echo __('Cake is able to connect to the database.'); + echo ''; + else: + echo ''; + echo __('Cake is NOT able to connect to the database.'); + echo ''; + endif; + ?> +

+ isConnected()): - echo ''; - echo __('Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - echo __('Cake is NOT able to connect to the database.'); - echo ''; - endif; -?> -

\n"; -$output .= "\n"; + App::uses('Validation', 'Utility'); + if (!Validation::alphaNumeric('cakephp')) { + echo '

'; + __('PCRE has not been compiled with Unicode support.'); + echo '
'; + __('Recompile PCRE with Unicode support by adding --enable-unicode-properties when configuring'); + echo '

'; + } +?>\n"; $output .= "

\n"; $output .= "

\n"; $output .= " The name of a supported driver; valid options are as follows: - * mysql - MySQL 4 & 5, - * sqlite - SQLite (PHP5 only), - * postgres - PostgreSQL 7 and higher, - * mssql - Microsoft SQL Server 2000 and higher, - * oracle - Oracle 8 and higher + * Datasabe/Mysql - MySQL 4 & 5, + * Datasabe/Sqlite - SQLite (PHP5 only), + * Datasabe/Postgres - PostgreSQL 7 and higher, + * Datasabe/Mssql - Microsoft SQL Server 2000 and higher, + * Datasabe/Oracle - Oracle 8 and higher * * You can add custom database drivers (or override existing drivers) by adding the - * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php', - * where 'x' is the name of the database. + * appropriate file to app/models/datasources/database. Drivers should be named 'MyDriver.php', + * * * persistent => true / false * Determines whether or not the database should use a persistent connection * * host => - * the host you connect to the database. To add a socket or port number, use 'port' => # + * the host you connect to the database. To add a socket or port number, use 'port' => # * * prefix => * Uses the given prefix for all the tables in this database. This setting can be overridden * on a per-table basis with the Model::$tablePrefix property. * * schema => - * For Postgresspecifies which schema you would like to use the tables in. Postgres defaults to - * 'public', DB2 defaults to empty. + * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'. * * encoding => - * For MySQL, Postgres and Sqlite, specifies the character encoding to use when connecting to the - * database. Uses database default. + * For MySQL, Postgres specifies the character encoding to use when connecting to the + * database. Uses database default not specified. * */ class DATABASE_CONFIG { public $default = array( - 'driver' => 'mysql', + 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', @@ -70,7 +69,7 @@ class DATABASE_CONFIG { ); public $test = array( - 'driver' => 'mysql', + 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', diff --git a/cake/console/templates/skel/config/routes.php b/lib/Cake/Console/templates/skel/config/routes.php similarity index 100% rename from cake/console/templates/skel/config/routes.php rename to lib/Cake/Console/templates/skel/config/routes.php diff --git a/cake/console/templates/skel/config/schema/db_acl.php b/lib/Cake/Console/templates/skel/config/schema/db_acl.php similarity index 100% rename from cake/console/templates/skel/config/schema/db_acl.php rename to lib/Cake/Console/templates/skel/config/schema/db_acl.php diff --git a/cake/console/templates/skel/config/schema/db_acl.sql b/lib/Cake/Console/templates/skel/config/schema/db_acl.sql similarity index 100% rename from cake/console/templates/skel/config/schema/db_acl.sql rename to lib/Cake/Console/templates/skel/config/schema/db_acl.sql diff --git a/cake/console/templates/skel/config/schema/i18n.php b/lib/Cake/Console/templates/skel/config/schema/i18n.php similarity index 100% rename from cake/console/templates/skel/config/schema/i18n.php rename to lib/Cake/Console/templates/skel/config/schema/i18n.php diff --git a/cake/console/templates/skel/config/schema/i18n.sql b/lib/Cake/Console/templates/skel/config/schema/i18n.sql similarity index 100% rename from cake/console/templates/skel/config/schema/i18n.sql rename to lib/Cake/Console/templates/skel/config/schema/i18n.sql diff --git a/cake/console/templates/skel/config/schema/sessions.php b/lib/Cake/Console/templates/skel/config/schema/sessions.php similarity index 100% rename from cake/console/templates/skel/config/schema/sessions.php rename to lib/Cake/Console/templates/skel/config/schema/sessions.php diff --git a/cake/console/templates/skel/config/schema/sessions.sql b/lib/Cake/Console/templates/skel/config/schema/sessions.sql similarity index 100% rename from cake/console/templates/skel/config/schema/sessions.sql rename to lib/Cake/Console/templates/skel/config/schema/sessions.sql diff --git a/cake/console/templates/skel/index.php b/lib/Cake/Console/templates/skel/index.php similarity index 100% rename from cake/console/templates/skel/index.php rename to lib/Cake/Console/templates/skel/index.php diff --git a/cake/console/templates/skel/tests/cases/controllers/empty b/lib/Cake/Console/templates/skel/locale/eng/LC_MESSAGES/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/controllers/empty rename to lib/Cake/Console/templates/skel/locale/eng/LC_MESSAGES/empty diff --git a/cake/console/templates/skel/tests/cases/datasources/empty b/lib/Cake/Console/templates/skel/plugins/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/datasources/empty rename to lib/Cake/Console/templates/skel/plugins/empty diff --git a/cake/console/templates/skel/tests/cases/helpers/empty b/lib/Cake/Console/templates/skel/tests/Case/Controller/Component/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/helpers/empty rename to lib/Cake/Console/templates/skel/tests/Case/Controller/Component/empty diff --git a/cake/console/templates/skel/tests/cases/models/empty b/lib/Cake/Console/templates/skel/tests/Case/Controller/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/models/empty rename to lib/Cake/Console/templates/skel/tests/Case/Controller/empty diff --git a/cake/console/templates/skel/tests/cases/shells/empty b/lib/Cake/Console/templates/skel/tests/Case/Model/Behavior/empty similarity index 100% rename from cake/console/templates/skel/tests/cases/shells/empty rename to lib/Cake/Console/templates/skel/tests/Case/Model/Behavior/empty diff --git a/cake/console/templates/skel/tests/fixtures/empty b/lib/Cake/Console/templates/skel/tests/Case/Model/empty similarity index 100% rename from cake/console/templates/skel/tests/fixtures/empty rename to lib/Cake/Console/templates/skel/tests/Case/Model/empty diff --git a/cake/console/templates/skel/tmp/cache/models/empty b/lib/Cake/Console/templates/skel/tests/Case/View/Helper/empty old mode 100755 new mode 100644 similarity index 100% rename from cake/console/templates/skel/tmp/cache/models/empty rename to lib/Cake/Console/templates/skel/tests/Case/View/Helper/empty diff --git a/cake/console/templates/skel/tmp/cache/persistent/empty b/lib/Cake/Console/templates/skel/tests/Fixture/empty old mode 100755 new mode 100644 similarity index 100% rename from cake/console/templates/skel/tmp/cache/persistent/empty rename to lib/Cake/Console/templates/skel/tests/Fixture/empty diff --git a/cake/console/templates/skel/tmp/cache/views/empty b/lib/Cake/Console/templates/skel/tmp/cache/models/empty old mode 100755 new mode 100644 similarity index 100% rename from cake/console/templates/skel/tmp/cache/views/empty rename to lib/Cake/Console/templates/skel/tmp/cache/models/empty diff --git a/cake/console/templates/skel/tmp/logs/empty b/lib/Cake/Console/templates/skel/tmp/cache/persistent/empty similarity index 100% rename from cake/console/templates/skel/tmp/logs/empty rename to lib/Cake/Console/templates/skel/tmp/cache/persistent/empty diff --git a/cake/console/templates/skel/tmp/sessions/empty b/lib/Cake/Console/templates/skel/tmp/cache/views/empty similarity index 100% rename from cake/console/templates/skel/tmp/sessions/empty rename to lib/Cake/Console/templates/skel/tmp/cache/views/empty diff --git a/cake/console/templates/skel/tmp/tests/empty b/lib/Cake/Console/templates/skel/tmp/logs/empty similarity index 100% rename from cake/console/templates/skel/tmp/tests/empty rename to lib/Cake/Console/templates/skel/tmp/logs/empty diff --git a/cake/console/templates/skel/vendors/empty b/lib/Cake/Console/templates/skel/tmp/sessions/empty similarity index 100% rename from cake/console/templates/skel/vendors/empty rename to lib/Cake/Console/templates/skel/tmp/sessions/empty diff --git a/cake/console/templates/skel/views/elements/empty b/lib/Cake/Console/templates/skel/tmp/tests/empty similarity index 100% rename from cake/console/templates/skel/views/elements/empty rename to lib/Cake/Console/templates/skel/tmp/tests/empty diff --git a/cake/console/templates/skel/views/errors/empty b/lib/Cake/Console/templates/skel/vendors/empty similarity index 100% rename from cake/console/templates/skel/views/errors/empty rename to lib/Cake/Console/templates/skel/vendors/empty diff --git a/cake/console/templates/skel/webroot/.htaccess b/lib/Cake/Console/templates/skel/webroot/.htaccess similarity index 100% rename from cake/console/templates/skel/webroot/.htaccess rename to lib/Cake/Console/templates/skel/webroot/.htaccess diff --git a/cake/console/templates/skel/webroot/css.php b/lib/Cake/Console/templates/skel/webroot/css.php similarity index 100% rename from cake/console/templates/skel/webroot/css.php rename to lib/Cake/Console/templates/skel/webroot/css.php diff --git a/cake/console/templates/skel/webroot/css/cake.generic.css b/lib/Cake/Console/templates/skel/webroot/css/cake.generic.css similarity index 100% rename from cake/console/templates/skel/webroot/css/cake.generic.css rename to lib/Cake/Console/templates/skel/webroot/css/cake.generic.css diff --git a/cake/console/templates/skel/webroot/favicon.ico b/lib/Cake/Console/templates/skel/webroot/favicon.ico similarity index 100% rename from cake/console/templates/skel/webroot/favicon.ico rename to lib/Cake/Console/templates/skel/webroot/favicon.ico diff --git a/cake/console/templates/skel/webroot/img/cake.icon.png b/lib/Cake/Console/templates/skel/webroot/img/cake.icon.png similarity index 100% rename from cake/console/templates/skel/webroot/img/cake.icon.png rename to lib/Cake/Console/templates/skel/webroot/img/cake.icon.png diff --git a/cake/console/templates/skel/webroot/img/cake.power.gif b/lib/Cake/Console/templates/skel/webroot/img/cake.power.gif similarity index 100% rename from cake/console/templates/skel/webroot/img/cake.power.gif rename to lib/Cake/Console/templates/skel/webroot/img/cake.power.gif diff --git a/cake/console/templates/skel/webroot/index.php b/lib/Cake/Console/templates/skel/webroot/index.php similarity index 93% rename from cake/console/templates/skel/webroot/index.php rename to lib/Cake/Console/templates/skel/webroot/index.php index f1ff8d197..77b9db786 100644 --- a/cake/console/templates/skel/webroot/index.php +++ b/lib/Cake/Console/templates/skel/webroot/index.php @@ -49,7 +49,7 @@ * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT); + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); } /** @@ -67,7 +67,7 @@ define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } - if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { + if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } @@ -75,6 +75,6 @@ return; } - require LIBS . 'dispatcher.php'; + require LIBS . 'Routing' . DS .'Dispatcher.php'; $Dispatcher = new Dispatcher(); $Dispatcher->dispatch(new CakeRequest()); diff --git a/cake/console/templates/skel/views/helpers/empty b/lib/Cake/Console/templates/skel/webroot/js/empty similarity index 100% rename from cake/console/templates/skel/views/helpers/empty rename to lib/Cake/Console/templates/skel/webroot/js/empty diff --git a/cake/console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php similarity index 87% rename from cake/console/templates/skel/webroot/test.php rename to lib/Cake/Console/templates/skel/webroot/test.php index c11aaac99..cb9180331 100644 --- a/cake/console/templates/skel/webroot/test.php +++ b/lib/Cake/Console/templates/skel/webroot/test.php @@ -67,21 +67,14 @@ if (!defined('CORE_PATH')) { define('APP_PATH', ROOT . DS . APP_DIR . DS); define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); } -if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { +if (!include(CORE_PATH . 'Cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } -$corePath = App::core('cake'); -if (isset($corePath[0])) { - define('TEST_CAKE_CORE_INCLUDE_PATH', rtrim($corePath[0], DS) . DS); -} else { - define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH); -} - if (Configure::read('debug') < 1) { die(__('Debug setting does not allow access to this url.')); } -require_once CAKE_TESTS_LIB . 'cake_test_suite_dispatcher.php'; +require_once CAKE_TESTS_LIB . 'CakeTestSuiteDispatcher.php'; CakeTestSuiteDispatcher::run(); diff --git a/cake/libs/controller/app_controller.php b/lib/Cake/Controller/AppController.php similarity index 96% rename from cake/libs/controller/app_controller.php rename to lib/Cake/Controller/AppController.php index 07c117dff..383cca2be 100644 --- a/cake/libs/controller/app_controller.php +++ b/lib/Cake/Controller/AppController.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Controller', 'Controller'); + /** * This is a placeholder class. * Create the same file in app/app_controller.php diff --git a/cake/libs/controller/cake_error_controller.php b/lib/Cake/Controller/CakeErrorController.php similarity index 100% rename from cake/libs/controller/cake_error_controller.php rename to lib/Cake/Controller/CakeErrorController.php diff --git a/cake/libs/controller/component.php b/lib/Cake/Controller/Component.php similarity index 98% rename from cake/libs/controller/component.php rename to lib/Cake/Controller/Component.php index f55840d1f..0993c171b 100644 --- a/cake/libs/controller/component.php +++ b/lib/Cake/Controller/Component.php @@ -15,7 +15,7 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Controller', 'ComponentCollection', false); +App::uses('ComponentCollection', 'Controller'); /** * Base class for an individual Component. Components provide resuable bits of diff --git a/cake/libs/controller/components/acl.php b/lib/Cake/Controller/Component/AclComponent.php similarity index 94% rename from cake/libs/controller/components/acl.php rename to lib/Cake/Controller/Component/AclComponent.php index 6795ab335..fde44da62 100644 --- a/cake/libs/controller/components/acl.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Component', 'Controller'); + /** * Access Control List factory class. * @@ -66,7 +68,7 @@ class AclComponent extends Component { list($plugin, $name) = pluginSplit($name); $name .= 'Component'; } else { - throw new CakeException(__('Could not find %s.', $name)); + throw new CakeException(__d('cake_dev', 'Could not find %s.', $name)); } } $this->adapter($name); @@ -90,7 +92,7 @@ class AclComponent extends Component { $adapter = new $adapter(); } if (!$adapter instanceof AclInterface) { - throw new CakeException(__('AclComponent adapters must implement AclInterface')); + throw new CakeException(__d('cake_dev', 'AclComponent adapters must implement AclInterface')); } $this->_Instance = $adapter; $this->_Instance->initialize($this); @@ -161,7 +163,7 @@ class AclComponent extends Component { * @deprecated */ public function grant($aro, $aco, $action = "*") { - trigger_error(__('AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'AclComponent::grant() is deprecated, use allow() instead'), E_USER_WARNING); return $this->_Instance->allow($aro, $aco, $action); } @@ -175,7 +177,7 @@ class AclComponent extends Component { * @deprecated */ public function revoke($aro, $aco, $action = "*") { - trigger_error(__('AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'AclComponent::revoke() is deprecated, use deny() instead'), E_USER_WARNING); return $this->_Instance->deny($aro, $aco, $action); } } @@ -262,9 +264,7 @@ class DbAcl extends Object implements AclInterface { */ function __construct() { parent::__construct(); - if (!class_exists('AclNode')) { - require LIBS . 'model' . DS . 'db_acl.php'; - } + App::uses('AclNode', 'Model'); $this->Aro = ClassRegistry::init(array('class' => 'Aro', 'alias' => 'Aro')); $this->Aco = ClassRegistry::init(array('class' => 'Aco', 'alias' => 'Aco')); } @@ -299,12 +299,12 @@ class DbAcl extends Object implements AclInterface { $acoPath = $this->Aco->node($aco); if (empty($aroPath) || empty($acoPath)) { - trigger_error(__("DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: ") . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); + trigger_error(__d('cake_dev', "DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: ") . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); return false; } if ($acoPath == null || $acoPath == array()) { - trigger_error(__("DbAcl::check() - Failed ACO node lookup in permissions check. Node references:\nAro: ") . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); + trigger_error(__d('cake_dev', "DbAcl::check() - Failed ACO node lookup in permissions check. Node references:\nAro: ") . print_r($aro, true) . "\nAco: " . print_r($aco, true), E_USER_WARNING); return false; } @@ -312,7 +312,7 @@ class DbAcl extends Object implements AclInterface { $acoNode = $acoPath[0]; if ($action != '*' && !in_array('_' . $action, $permKeys)) { - trigger_error(__("ACO permissions key %s does not exist in DbAcl::check()", $action), E_USER_NOTICE); + trigger_error(__d('cake_dev', "ACO permissions key %s does not exist in DbAcl::check()", $action), E_USER_NOTICE); return false; } @@ -386,7 +386,7 @@ class DbAcl extends Object implements AclInterface { $save = array(); if ($perms == false) { - trigger_error(__('DbAcl::allow() - Invalid node'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'DbAcl::allow() - Invalid node'), E_USER_WARNING); return false; } if (isset($perms[0])) { @@ -657,7 +657,7 @@ class IniAcl extends Object implements AclInterface { * @return array INI section structure */ public function readConfigFile($filename) { - App::import('Core', 'config/IniReader'); + App::uses('IniReader', 'Configure'); $iniFile = new IniReader(dirname($filename) . DS); return $iniFile->read(basename($filename)); } diff --git a/cake/libs/controller/components/auth/actions_authorize.php b/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php similarity index 95% rename from cake/libs/controller/components/auth/actions_authorize.php rename to lib/Cake/Controller/Component/Auth/ActionsAuthorize.php index c2f1f35d2..684fb47a0 100644 --- a/cake/libs/controller/components/auth/actions_authorize.php +++ b/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authorize'); + +App::uses('BaseAuthorize', 'Controller/Component/Auth'); /** * An authorization adapter for AuthComponent. Provides the ability to authorize using the AclComponent, diff --git a/cake/libs/controller/components/auth/base_authenticate.php b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php similarity index 98% rename from cake/libs/controller/components/auth/base_authenticate.php rename to lib/Cake/Controller/Component/Auth/BaseAuthenticate.php index 1cfcc8896..aba2a8328 100644 --- a/cake/libs/controller/components/auth/base_authenticate.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Security'); + +App::uses('Security', 'Utility'); /** * Base Authentication class with common methods and properties. diff --git a/cake/libs/controller/components/auth/base_authorize.php b/lib/Cake/Controller/Component/Auth/BaseAuthorize.php similarity index 97% rename from cake/libs/controller/components/auth/base_authorize.php rename to lib/Cake/Controller/Component/Auth/BaseAuthorize.php index 911bbdb24..f4b7cad27 100644 --- a/cake/libs/controller/components/auth/base_authorize.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthorize.php @@ -87,7 +87,7 @@ abstract class BaseAuthorize { public function controller($controller = null) { if ($controller) { if (!$controller instanceof Controller) { - throw new CakeException(__('$controller needs to be an instance of Controller')); + throw new CakeException(__d('cake_dev', '$controller needs to be an instance of Controller')); } $this->_Controller = $controller; return true; diff --git a/cake/libs/controller/components/auth/basic_authenticate.php b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php similarity index 98% rename from cake/libs/controller/components/auth/basic_authenticate.php rename to lib/Cake/Controller/Component/Auth/BasicAuthenticate.php index 2ba467e98..148734629 100644 --- a/cake/libs/controller/components/auth/basic_authenticate.php +++ b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authenticate'); + +App::uses('BaseAuthenticate', 'Controller/Component/Auth'); /** * Basic Authentication adapter for AuthComponent. diff --git a/cake/libs/controller/components/auth/controller_authorize.php b/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php similarity index 91% rename from cake/libs/controller/components/auth/controller_authorize.php rename to lib/Cake/Controller/Component/Auth/ControllerAuthorize.php index 8fd66b10d..641eb6aff 100644 --- a/cake/libs/controller/components/auth/controller_authorize.php +++ b/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authorize'); + +App::uses('BaseAuthorize', 'Controller/Component/Auth'); /** * An authorization adapter for AuthComponent. Provides the ability to authorize using a controller callback. @@ -45,7 +46,7 @@ class ControllerAuthorize extends BaseAuthorize { public function controller($controller = null) { if ($controller) { if (!method_exists($controller, 'isAuthorized')) { - throw new CakeException(__('$controller does not implement an isAuthorized() method.')); + throw new CakeException(__d('cake_dev', '$controller does not implement an isAuthorized() method.')); } } return parent::controller($controller); diff --git a/cake/libs/controller/components/auth/crud_authorize.php b/lib/Cake/Controller/Component/Auth/CrudAuthorize.php similarity index 96% rename from cake/libs/controller/components/auth/crud_authorize.php rename to lib/Cake/Controller/Component/Auth/CrudAuthorize.php index be127f43a..91be83b79 100644 --- a/cake/libs/controller/components/auth/crud_authorize.php +++ b/lib/Cake/Controller/Component/Auth/CrudAuthorize.php @@ -12,7 +12,9 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authorize'); + +App::uses('BaseAuthorize', 'Controller/Component/Auth'); +App::uses('Router', 'Routing'); /** * An authorization adapter for AuthComponent. Provides the ability to authorize using CRUD mappings. @@ -79,7 +81,7 @@ class CrudAuthorize extends BaseAuthorize { */ public function authorize($user, CakeRequest $request) { if (!isset($this->settings['actionMap'][$request->params['action']])) { - trigger_error(__( + trigger_error(__d('cake_dev', 'CrudAuthorize::authorize() - Attempted access of un-mapped action "%1$s" in controller "%2$s"', $request->action, $request->controller diff --git a/cake/libs/controller/components/auth/digest_authenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php similarity index 99% rename from cake/libs/controller/components/auth/digest_authenticate.php rename to lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index c27f293c0..69c3ae228 100644 --- a/cake/libs/controller/components/auth/digest_authenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authenticate'); + +App::uses('BaseAuthenticate', 'Controller/Component/Auth'); /** * Digest Authentication adapter for AuthComponent. diff --git a/cake/libs/controller/components/auth/form_authenticate.php b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php similarity index 97% rename from cake/libs/controller/components/auth/form_authenticate.php rename to lib/Cake/Controller/Component/Auth/FormAuthenticate.php index d24d9acf2..f0f708088 100644 --- a/cake/libs/controller/components/auth/form_authenticate.php +++ b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php @@ -12,7 +12,8 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Component', 'auth/base_authenticate'); + +App::uses('BaseAuthenticate', 'Controller/Component/Auth'); /** * An authentication adapter for AuthComponent. Provides the ability to authenticate using POST diff --git a/cake/libs/controller/components/auth.php b/lib/Cake/Controller/Component/AuthComponent.php similarity index 93% rename from cake/libs/controller/components/auth.php rename to lib/Cake/Controller/Component/AuthComponent.php index 19106aca3..28b7e1bea 100644 --- a/cake/libs/controller/components/auth.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -19,11 +19,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Router', false); -App::import('Core', 'Security', false); -App::import('Core', 'CakeSession', false); -App::import('Component', 'auth/base_authorize'); -App::import('Component', 'auth/base_authenticate'); + +App::uses('Component', 'Controller'); +App::uses('Router', 'Routing'); +App::uses('Security', 'Utility'); +App::uses('Debugger', 'Utility'); +App::uses('CakeSession', 'Model/Datasource'); +App::uses('BaseAuthorize', 'Controller/Component/Auth'); +App::uses('BaseAuthenticate', 'Controller/Component/Auth'); /** * Authentication control component class @@ -253,7 +256,6 @@ class AuthComponent extends Component { $this->_methods = $controller->methods; if (Configure::read('debug') > 0) { - App::import('Debugger'); Debugger::checkSecurityKeys(); } } @@ -349,7 +351,7 @@ class AuthComponent extends Component { function __setDefaults() { $defaults = array( 'logoutRedirect' => $this->loginAction, - 'authError' => __('You are not authorized to access that location.') + 'authError' => __d('cake', 'You are not authorized to access that location.') ); foreach ($defaults as $key => $value) { if (empty($this->{$key})) { @@ -361,7 +363,7 @@ class AuthComponent extends Component { /** * Uses the configured Authorization adapters to check whether or not a user is authorized. - * Each adapter will be checked in sequence, if any of them return true, then the user will + * Each adapter will be checked in sequence, if any of them return true, then the user will * be authorized for the request. * * @param mixed $user The user to check the authorization of. If empty the user in the session will be used. @@ -405,12 +407,14 @@ class AuthComponent extends Component { unset($config[AuthComponent::ALL]); } foreach ($config as $class => $settings) { + list($plugin, $class) = pluginSplit($class, true); $className = $class . 'Authorize'; - if (!class_exists($className) && !App::import('Component', 'auth/' . $class . '_authorize')) { - throw new CakeException(__('Authorization adapter "%s" was not found.', $class)); + App::uses($className, $plugin . 'Controller/Component/Auth'); + if (!class_exists($className)) { + throw new CakeException(__d('cake_dev', 'Authorization adapter "%s" was not found.', $class)); } if (!method_exists($className, 'authorize')) { - throw new CakeException(__('Authorization objects must implement an authorize method.')); + throw new CakeException(__d('cake_dev', 'Authorization objects must implement an authorize method.')); } $settings = array_merge($global, (array)$settings); $this->_authorizeObjects[] = new $className($this->_Collection, $settings); @@ -424,7 +428,7 @@ class AuthComponent extends Component { * * You can use allow with either an array, or var args. * - * `$this->Auth->allow(array('edit', 'add'));` or + * `$this->Auth->allow(array('edit', 'add'));` or * `$this->Auth->allow('edit', 'add');` * * allow() also supports '*' as a wildcard to mean all actions. @@ -454,7 +458,7 @@ class AuthComponent extends Component { * * You can use deny with either an array, or var args. * - * `$this->Auth->deny(array('edit', 'add'));` or + * `$this->Auth->deny(array('edit', 'add'));` or * `$this->Auth->deny('edit', 'add');` * * @param mixed $action Controller action name or array of actions @@ -582,8 +586,8 @@ class AuthComponent extends Component { } /** - * If no parameter is passed, gets the authentication redirect URL. Pass a url in to - * set the destination a user should be redirected to upon logging in. Will fallback to + * If no parameter is passed, gets the authentication redirect URL. Pass a url in to + * set the destination a user should be redirected to upon logging in. Will fallback to * AuthComponent::$loginRedirect if there is no stored redirect value. * * @param mixed $url Optional URL to write as the login redirect URL. @@ -643,12 +647,14 @@ class AuthComponent extends Component { unset($config[AuthComponent::ALL]); } foreach ($config as $class => $settings) { + list($plugin, $class) = pluginSplit($class, true); $className = $class . 'Authenticate'; - if (!class_exists($className) && !App::import('Component', 'auth/' . $class . '_authenticate')) { - throw new CakeException(__('Authentication adapter "%s" was not found.', $class)); + App::uses($className, $plugin . 'Controller/Component/Auth'); + if (!class_exists($className)) { + throw new CakeException(__d('cake_dev', 'Authentication adapter "%s" was not found.', $class)); } if (!method_exists($className, 'authenticate')) { - throw new CakeException(__('Authentication objects must implement an authenticate method.')); + throw new CakeException(__d('cake_dev', 'Authentication objects must implement an authenticate method.')); } $settings = array_merge($global, (array)$settings); $this->_authenticateObjects[] = new $className($this->_Collection, $settings); diff --git a/cake/libs/controller/components/cookie.php b/lib/Cake/Controller/Component/CookieComponent.php similarity index 99% rename from cake/libs/controller/components/cookie.php rename to lib/Cake/Controller/Component/CookieComponent.php index bb614c0bc..cca49a5bf 100644 --- a/cake/libs/controller/components/cookie.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -17,10 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -/** - * Load Security class - */ -App::import('Core', 'Security'); +App::uses('Component', 'Controller'); +App::uses('Security', 'Utility'); /** * Cookie Component. diff --git a/cake/libs/controller/components/email.php b/lib/Cake/Controller/Component/EmailComponent.php old mode 100755 new mode 100644 similarity index 98% rename from cake/libs/controller/components/email.php rename to lib/Cake/Controller/Component/EmailComponent.php index 68972daf1..103ccafed --- a/cake/libs/controller/components/email.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -16,7 +16,9 @@ * @since CakePHP(tm) v 1.2.0.3467 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Multibyte'); + +App::uses('Component', 'Controller'); +App::uses('Multibyte', 'I18n'); /** * EmailComponent @@ -456,9 +458,9 @@ class EmailComponent extends Component { $viewClass = $this->Controller->view; if ($viewClass != 'View') { - list($plugin, $viewClass) = pluginSplit($viewClass); + list($plugin, $viewClass) = pluginSplit($viewClass, true); $viewClass = $viewClass . 'View'; - App::import('View', $this->Controller->view); + App::uses($viewClass, $plugin . 'View'); } $View = new $viewClass($this->Controller); @@ -723,7 +725,7 @@ class EmailComponent extends Component { $formatted = array(); if ($this->_lineLength !== null) { - trigger_error(__('_lineLength cannot be accessed please use lineLength'), E_USER_WARNING); + trigger_error(__d('cake_dev', '_lineLength cannot be accessed please use lineLength'), E_USER_WARNING); $this->lineLength = $this->_lineLength; } @@ -850,7 +852,7 @@ class EmailComponent extends Component { * @access private */ function _smtp() { - App::import('Core', 'CakeSocket'); + App::uses('CakeSocket', 'Network'); $defaults = array( 'host' => 'localhost', diff --git a/cake/libs/controller/components/paginator.php b/lib/Cake/Controller/Component/PaginatorComponent.php similarity index 100% rename from cake/libs/controller/components/paginator.php rename to lib/Cake/Controller/Component/PaginatorComponent.php diff --git a/cake/libs/controller/components/request_handler.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php similarity index 99% rename from cake/libs/controller/components/request_handler.php rename to lib/Cake/Controller/Component/RequestHandlerComponent.php index f818ef63b..56cf6c448 100644 --- a/cake/libs/controller/components/request_handler.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Xml', 'Utility'); + /** * Request object for handling HTTP requests * @@ -171,9 +173,6 @@ class RequestHandlerComponent extends Component { } if ($this->requestedWith('xml')) { - if (!class_exists('Xml')) { - App::import('Core', 'Xml'); - } try { $xml = Xml::build(trim(file_get_contents('php://input'))); @@ -542,7 +541,8 @@ class RequestHandlerComponent extends Component { ); if (!$isAdded) { - if (App::import('Helper', $helper)) { + App::uses($helper . 'Helper', 'View/Helper'); + if (class_exists($helper . 'Helper')) { $controller->helpers[] = $helper; } } diff --git a/cake/libs/controller/components/security.php b/lib/Cake/Controller/Component/SecurityComponent.php similarity index 99% rename from cake/libs/controller/components/security.php rename to lib/Cake/Controller/Component/SecurityComponent.php index 7b1f6cac8..16cdc6413 100644 --- a/cake/libs/controller/components/security.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -16,8 +16,10 @@ * @since CakePHP(tm) v 0.10.8.2156 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String', false); -App::import('Core', 'Security', false); + +App::uses('Component', 'Controller'); +App::uses('String', 'Utility'); +App::uses('Security', 'Utility'); /** * SecurityComponent diff --git a/cake/libs/controller/components/session.php b/lib/Cake/Controller/Component/SessionComponent.php similarity index 98% rename from cake/libs/controller/components/session.php rename to lib/Cake/Controller/Component/SessionComponent.php index fefa7dbf7..9d2231150 100644 --- a/cake/libs/controller/components/session.php +++ b/lib/Cake/Controller/Component/SessionComponent.php @@ -16,9 +16,9 @@ * @since CakePHP(tm) v 0.10.0.1232 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('cakesession')) { - require LIBS . 'cake_session.php'; -} + +App::uses('Component', 'Controller'); +App::uses('CakeSession', 'Model/Datasource'); /** * Session Component. diff --git a/cake/libs/controller/component_collection.php b/lib/Cake/Controller/ComponentCollection.php similarity index 87% rename from cake/libs/controller/component_collection.php rename to lib/Cake/Controller/ComponentCollection.php index 07a2a6eef..909fd70e1 100644 --- a/cake/libs/controller/component_collection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -15,6 +15,10 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('ObjectCollection', 'Utility'); +App::uses('Component', 'Controller'); + class ComponentCollection extends ObjectCollection { /** @@ -76,7 +80,7 @@ class ComponentCollection extends ObjectCollection { $alias = $component; $component = $settings['className']; } - list($plugin, $name) = pluginSplit($component); + list($plugin, $name) = pluginSplit($component, true); if (!isset($alias)) { $alias = $name; } @@ -84,19 +88,12 @@ class ComponentCollection extends ObjectCollection { return $this->_loaded[$alias]; } $componentClass = $name . 'Component'; + App::uses($componentClass, $plugin . 'Controller/Component'); if (!class_exists($componentClass)) { - if (!App::import('Component', $component)) { - throw new MissingComponentFileException(array( - 'file' => Inflector::underscore($componentClass) . '.php', - 'class' => $componentClass - )); - } - if (!class_exists($componentClass)) { - throw new MissingComponentClassException(array( - 'file' => Inflector::underscore($componentClass) . '.php', - 'class' => $componentClass - )); - } + throw new MissingComponentClassException(array( + 'file' => Inflector::underscore($componentClass) . '.php', + 'class' => $componentClass + )); } $this->_loaded[$alias] = new $componentClass($this, $settings); $enable = isset($settings['enabled']) ? $settings['enabled'] : true; diff --git a/cake/libs/controller/controller.php b/lib/Cake/Controller/Controller.php similarity index 98% rename from cake/libs/controller/controller.php rename to lib/Cake/Controller/Controller.php index f09601c86..697629387 100644 --- a/cake/libs/controller/controller.php +++ b/lib/Cake/Controller/Controller.php @@ -20,10 +20,10 @@ /** * Include files */ -App::import('Core', 'CakeResponse', false); -App::import('Core', 'ClassRegistry', false); -App::import('Controller', 'Component', false); -App::import('View', 'View', false); +App::uses('CakeResponse', 'Network'); +App::uses('ClassRegistry', 'Utility'); +App::uses('ComponentCollection', 'Controller'); +App::uses('View', 'View'); /** * Application controller class for organization of business logic. @@ -311,18 +311,14 @@ class Controller extends Object { */ public function __construct($request = null) { if ($this->name === null) { - $r = null; - if (!preg_match('/(.*)Controller/i', get_class($this), $r)) { - echo __("Controller::__construct() : Can not get or parse my own class name, exiting."); - $this->_stop(); - } - $this->name = $r[1]; + $this->name = substr(get_class($this), 0, strlen(get_class($this)) -10); } if ($this->viewPath == null) { $this->viewPath = Inflector::underscore($this->name); } - $this->modelClass = Inflector::classify($this->name); + + $this->modelClass = Inflector::singularize($this->name); $this->modelKey = Inflector::underscore($this->modelClass); $this->Components = new ComponentCollection(); @@ -339,7 +335,7 @@ class Controller extends Object { } /** - * Provides backwards compatbility avoid problems with empty and isset to alias properties. + * Provides backwards compatibility to avoid problems with empty and isset to alias properties. * * @return void */ @@ -828,9 +824,9 @@ class Controller extends Object { $viewClass = $this->viewClass; if ($this->viewClass != 'View') { - list($plugin, $viewClass) = pluginSplit($viewClass); + list($plugin, $viewClass) = pluginSplit($viewClass, true); $viewClass = $viewClass . 'View'; - App::import('View', $this->viewClass); + App::uses($viewClass, $plugin . 'View'); } $this->request->params['models'] = $this->modelNames; diff --git a/cake/libs/controller/pages_controller.php b/lib/Cake/Controller/PagesController.php similarity index 97% rename from cake/libs/controller/pages_controller.php rename to lib/Cake/Controller/PagesController.php index 65e8b0465..c842bc9ca 100644 --- a/cake/libs/controller/pages_controller.php +++ b/lib/Cake/Controller/PagesController.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppController', 'Controller'); + /** * Static content controller * diff --git a/cake/libs/controller/scaffold.php b/lib/Cake/Controller/Scaffold.php similarity index 94% rename from cake/libs/controller/scaffold.php rename to lib/Cake/Controller/Scaffold.php index ab66e137a..054e3a1a3 100644 --- a/cake/libs/controller/scaffold.php +++ b/lib/Cake/Controller/Scaffold.php @@ -18,7 +18,7 @@ * @since Cake v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'Scaffold'); +App::uses('Scaffold', 'View'); /** * Scaffolding is a set of automatic actions for starting web development work faster. @@ -127,7 +127,7 @@ class Scaffold { $this->ScaffoldModel = $this->controller->{$this->modelClass}; $this->scaffoldTitle = Inflector::humanize($this->viewPath); $this->scaffoldActions = $controller->scaffold; - $title_for_layout = __('Scaffold :: ') . Inflector::humanize($request->action) . ' :: ' . $this->scaffoldTitle; + $title_for_layout = __d('cake', 'Scaffold :: ') . Inflector::humanize($request->action) . ' :: ' . $this->scaffoldTitle; $modelClass = $this->controller->modelClass; $primaryKey = $this->ScaffoldModel->primaryKey; $displayField = $this->ScaffoldModel->displayField; @@ -174,7 +174,7 @@ class Scaffold { $this->ScaffoldModel->id = $request->params['pass'][0]; } if (!$this->ScaffoldModel->exists()) { - throw new NotFoundException(__('Invalid %s', Inflector::humanize($this->modelKey))); + throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelKey))); } $this->ScaffoldModel->recursive = 1; $this->controller->request->data = $this->ScaffoldModel->read(); @@ -231,10 +231,10 @@ class Scaffold { */ protected function _scaffoldSave(CakeRequest $request, $action = 'edit') { $formAction = 'edit'; - $success = __('updated'); + $success = __d('cake', 'updated'); if ($action === 'add') { $formAction = 'add'; - $success = __('saved'); + $success = __d('cake', 'saved'); } if ($this->controller->_beforeScaffold($action)) { @@ -243,7 +243,7 @@ class Scaffold { $this->ScaffoldModel->id = $request['pass'][0]; } if (!$this->ScaffoldModel->exists()) { - throw new NotFoundException(__('Invalid %s', Inflector::humanize($this->modelKey))); + throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelKey))); } } @@ -254,7 +254,7 @@ class Scaffold { if ($this->ScaffoldModel->save($request->data)) { if ($this->controller->_afterScaffoldSave($action)) { - $message = __( + $message = __d('cake', 'The %1$s has been %2$s', Inflector::humanize($this->modelKey), $success @@ -265,7 +265,7 @@ class Scaffold { } } else { if ($this->_validSession) { - $this->controller->Session->setFlash(__('Please correct errors below.')); + $this->controller->Session->setFlash(__d('cake', 'Please correct errors below.')); } } } @@ -312,13 +312,13 @@ class Scaffold { } $this->ScaffoldModel->id = $id; if (!$this->ScaffoldModel->exists()) { - throw new NotFoundException(__('Invalid %s', Inflector::humanize($this->modelClass))); + throw new NotFoundException(__d('cake', 'Invalid %s', Inflector::humanize($this->modelClass))); } if ($this->ScaffoldModel->delete()) { - $message = __('The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id); + $message = __d('cake', 'The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id); return $this->_sendMessage($message); } else { - $message = __( + $message = __d('cake', 'There was an error deleting the %1$s with id: %2$d', Inflector::humanize($this->modelClass), $id diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php new file mode 100644 index 000000000..014f812db --- /dev/null +++ b/lib/Cake/Core/App.php @@ -0,0 +1,820 @@ + array('extends' => null, 'core' => true), + 'file' => array('extends' => null, 'core' => true), + 'model' => array('extends' => 'AppModel', 'core' => false), + 'behavior' => array('extends' => 'ModelBehavior', 'core' => true), + 'controller' => array('suffix' => 'Controller', 'extends' => 'AppController', 'core' => true), + 'component' => array('suffix' => 'Component', 'extends' => null, 'core' => true), + 'lib' => array('extends' => null, 'core' => true), + 'view' => array('suffix' => 'View', 'extends' => null, 'core' => true), + 'helper' => array('suffix' => 'Helper', 'extends' => 'AppHelper', 'core' => true), + 'vendor' => array('extends' => null, 'core' => true), + 'shell' => array('suffix' => 'Shell', 'extends' => 'Shell', 'core' => true), + 'plugin' => array('extends' => null, 'core' => true) + ); + +/** + * Paths to search for files. + * + * @var array + */ + public static $search = array(); + +/** + * Whether or not to return the file that is loaded. + * + * @var boolean + */ + public static $return = false; + +/** + * Determines if $__maps and $__paths cache should be written. + * + * @var boolean + */ + private static $__cache = false; + +/** + * Holds key/value pairs of $type => file path. + * + * @var array + */ + private static $__map = array(); + +/** + * Holds paths for deep searching of files. + * + * @var array + */ + private static $__paths = array(); + +/** + * Holds loaded files. + * + * @var array + */ + private static $__loaded = array(); + +/** + * Holds and key => value array of object types. + * + * @var array + */ + private static $__objects = array(); + +/** + * Holds the location of each class + * + */ + private static $__classMap = array(); + +/** + * Holds the possible paths for each package name + * + */ + private static $__packages = array(); + +/** + * Holds the templates for each customizable package path in the application + * + */ + private static $__packageFormat = array(); + +/** + * Maps an old style CakePHP class type to the corresponding package + * + */ + public static $legacy = array( + 'models' => 'Model', + 'behaviors' => 'Model/Behavior', + 'datasources' => 'Model/Datasource', + 'controllers' => 'Controller', + 'components' => 'Controller/Component', + 'views' => 'View', + 'helpers' => 'View/Helper', + 'shells' => 'Console/Command', + 'libs' => 'Lib' + ); + +/** + * Inicates whether the class cache should be stored again because of an addition to it + * + */ + private static $_cacheChange = false; + +/** + * Inicates whether the object cache should be stored again because of an addition to it + * + */ + private static $_objectCacheChange = false; + +/** + * Used to read information stored path + * + * Usage: + * + * `App::path('Model'); will return all paths for models` + * + * `App::path('Model/Datasource', 'MyPlugin'); will return the path for datasources under the 'MyPlugin' plugin` + * + * @param string $type type of path + * @param string $plugin name of plugin + * @return string array + */ + public static function path($type, $plugin = null) { + if (!empty(self::$legacy[$type])) { + $type = self::$legacy[$type]; + } + + if (!empty($plugin)) { + $path = array(); + $pluginPath = self::pluginPath($plugin); + if (!empty(self::$__packageFormat[$type])) { + foreach (self::$__packageFormat[$type] as $f) { + $path[] = sprintf($f, $pluginPath); + } + } + $path[] = $pluginPath . 'Lib' . DS . $type . DS; + return $path; + } + + if (!isset(self::$__packages[$type])) { + return array(); + } + return self::$__packages[$type]; + } + +/** + * Sets up each package location on the file system. You can configure multiple search paths + * for each package, those will be used to look for files one folder at a time in the specified order + * All paths should be terminated with a Directory separator + * + * Usage: + * + * `App::build(array(Model' => array('/a/full/path/to/models/'))); will setup a new search path for the Model package` + * + * `App::build(array('Model' => array('/path/to/models/')), true); will setup the path as the only valid path for searching models` + * + * `App::build(array('View/Helper' => array('/path/to/models/', '/another/path/))); will setup multiple search paths for helpers` + * + * @param array $paths associative array with package names as keys and a list of directories for new search paths + * @param boolean $reset true will set paths, false merges paths [default] false + * @return void + */ + public static function build($paths = array(), $reset = false) { + if (empty(self::$__packageFormat)) { + self::$__packageFormat = array( + 'Model' => array( + '%s' . 'Model' . DS, + '%s' . 'models' . DS + ), + 'Model/Behavior' => array( + '%s' . 'Model' . DS . 'Behavior' . DS, + '%s' . 'models' . DS . 'behaviors' . DS + ), + 'Model/Datasource' => array( + '%s' . 'Model' . DS . 'Datasource' . DS, + '%s' . 'models' . DS . 'datasources' . DS + ), + 'Model/Datasource/Database' => array( + '%s' . 'Model' . DS . 'Datasource' . DS . 'Database' . DS, + '%s' . 'models' . DS . 'datasources' . DS . 'database' . DS + ), + 'Model/Datasource/Session' => array( + '%s' . 'Model' . DS . 'Datasource' . DS . 'Session' . DS, + '%s' . 'models' . DS . 'datasources' . DS . 'session' . DS + ), + 'Controller' => array( + '%s' . 'Controller' . DS, + '%s' . 'controllers' . DS + ), + 'Controller/Component' => array( + '%s' . 'Controller' . DS . 'Component' . DS, + '%s' . 'controllers' . DS . 'components' . DS + ), + 'View' => array( + '%s' . 'View' . DS, + '%s' . 'views' . DS + ), + 'View/Helper' => array( + '%s' . 'View' . DS . 'Helper' . DS, + '%s' . 'views' . DS . 'helpers' . DS + ), + 'Console' => array( + '%s' . 'Console' . DS, + '%s' . 'console' . DS + ), + 'Console/Command' => array( + '%s' . 'Console' . DS . 'Command' . DS, + '%s' . 'console' . DS . 'shells' . DS, + ), + 'Console/Command/Task' => array( + '%s' . 'Console' . DS . 'Command' . DS . 'Task' . DS, + '%s' . 'console' . DS . 'shells' . DS . 'tasks' . DS + ), + 'Lib' => array( + '%s' . 'Lib' . DS, + '%s' . 'libs' . DS + ), + 'locales' => array( + '%s' . 'locale' . DS + ), + 'vendors' => array('%s' . 'vendors' . DS, VENDORS), + 'plugins' => array(APP . 'plugins' . DS, CAKE_CORE_INCLUDE_PATH . DS . 'plugins' . DS) + ); + } + + if ($reset == true) { + foreach ($paths as $type => $new) { + if (!empty(self::$legacy[$type])) { + $type = self::$legacy[$type]; + } + self::$__packages[$type] = (array)$new; + } + return $paths; + } + + //Provides Backwards compatibility for old-style package names + $legacyPaths = array(); + foreach ($paths as $type => $path) { + if (!empty(self::$legacy[$type])) { + $type = self::$legacy[$type]; + } + $legacyPaths[$type] = $path; + } + + $paths = $legacyPaths; + $defaults = array(); + foreach (self::$__packageFormat as $package => $format) { + foreach ($format as $f) { + $defaults[$package][] = sprintf($f, APP); + } + } + + $mergeExclude = array('Lib', 'locales', 'vendors', 'plugins'); + $appLibs = empty($paths['Lib']) ? $defaults['Lib'] : $paths['Lib']; + + foreach ($defaults as $type => $default) { + if (empty(self::$__packages[$type]) || empty($paths)) { + self::$__packages[$type] = $default; + } + + if (!empty($paths[$type])) { + $path = array_merge((array)$paths[$type], self::$__packages[$type]); + } else { + $path = self::$__packages[$type]; + } + + self::$__packages[$type] = array_values(array_unique($path)); + } + } + +/** + * Gets the path that a plugin is on. Searches through the defined plugin paths. + * + * Usage: + * + * `App::pluginPath('MyPlugin'); will return the full path to 'MyPlugin' plugin'` + * + * @param string $plugin CamelCased/lower_cased plugin name to find the path of. + * @return string full path to the plugin. + */ + public static function pluginPath($plugin) { + $pluginDir = Inflector::underscore($plugin); + foreach (self::$__packages['plugins'] as $pluginPath) { + if (is_dir($pluginPath . $pluginDir)) { + return $pluginPath . $pluginDir . DS ; + } + } + return self::$__packages['plugins'][0] . $pluginDir . DS; + } + +/** + * Finds the path that a theme is on. Searches through the defined theme paths. + * + * Usage: + * + * `App::themePath('MyTheme'); will return the full path to the 'MyTheme' theme` + * + * @param string $theme lower_cased theme name to find the path of. + * @return string full path to the theme. + */ + public static function themePath($theme) { + $themeDir = 'themed' . DS . Inflector::underscore($theme); + foreach (self::$__packages['View'] as $path) { + if (is_dir($path . $themeDir)) { + return $path . $themeDir . DS ; + } + } + return self::$__packages['View'][0] . $themeDir . DS; + } + +/** + * Returns the full path to a package inside the CakePHP core + * + * Usage: + * + * `App::core('Cache/Engine'); will return the full path to the cache engines package` + * + * @param string $type + * @return string full path to package + */ + public static function core($type) { + if ($type) { + return isset($paths[$type]) ? $paths[$type] : array(LIBS . $type . DS); + } + } + +/** + * Returns an array of objects of the given type. + * + * Example usage: + * + * `App::objects('plugin');` returns `array('DebugKit', 'Blog', 'User');` + * + * `App::objects('Controller');` returns `array('PagesController', 'BlogController');` + * + * You can also search only within a plugin's objects by using the plugin dot + * syntax. + * + * `App::objects('MyPlugin.Model');` returns `array('MyPluginPost', 'MyPluginComment');` + * + * @param string $type Type of object, i.e. 'Model', 'Controller', 'View/Helper', 'file', 'class' or 'plugin' + * @param mixed $path Optional Scan only the path given. If null, paths for the chosen type will be used. + * @param boolean $cache Set to false to rescan objects of the chosen type. Defaults to true. + * @return mixed Either false on incorrect / miss. Or an array of found objects. + */ + public static function objects($type, $path = null, $cache = true) { + $objects = array(); + $extension = '/\.php$/'; + $includeDirectories = false; + $name = $type; + + if ($type === 'plugin') { + $type = 'plugins'; + } + + if ($type == 'plugins') { + $extension = '/.*/'; + $includeDirectories = true; + } + + list($plugin, $type) = pluginSplit($type); + + if (isset(self::$legacy[$type . 's'])) { + $type = self::$legacy[$type . 's']; + } + + if ($type === 'file' && !$path) { + return false; + } elseif ($type === 'file') { + $extension = '/\.php$/'; + $name = $type . str_replace(DS, '', $path); + } + + if (empty(self::$__objects) && $cache === true) { + self::$__objects = Cache::read('object_map', '_cake_core_'); + } + + $cacheLocation = empty($plugin) ? 'app' : $plugin; + + if ($cache !== true || !isset(self::$__objects[$cacheLocation][$name])) { + $objects = array(); + + if (empty($path)) { + $path = self::path($type, $plugin); + } + + $items = array(); + + foreach ((array)$path as $dir) { + if ($dir != APP && is_dir($dir)) { + $files = new RegexIterator(new DirectoryIterator($dir), $extension); + foreach ($files as $file) { + if (!$file->isDot()) { + $isDir = $file->isDir() ; + if ($isDir && $includeDirectories) { + $objects[] = basename($file); + } elseif (!$includeDirectories && !$isDir) { + $objects[] = substr(basename($file), 0, -4); + } + } + } + } + } + + if ($type !== 'file') { + foreach ($objects as $key => $value) { + $objects[$key] = Inflector::camelize($value); + } + } + + if ($cache === true) { + self::$__cache = true; + } + if ($plugin) { + return $objects; + } + self::$__objects[$cacheLocation][$name] = $objects; + self::$_objectCacheChange = true; + } + + return self::$__objects[$cacheLocation][$name]; + } + +/** + * Allows you to modify the object listings that App maintains inside of it + * Useful for testing + * + * @param string $type Type of object listing you are changing + * @param array $values The values $type should be set to. + * @return void + */ + public static function setObjects($type, $values) { + list($plugin, $type) = pluginSplit($type); + $cacheLocation = empty($plugin) ? 'app' : $plugin; + self::$__objects[$cacheLocation][$type] = $values; + } + +/** + * Declares a package for a class. This package location will be used + * by the automatic class loader if the class is tried to be used + * + * Usage: + * + * `App::uses('MyCustomController', 'Controller');` will setup the class to be found under Controller package + * + * `App::uses('MyHelper', 'MyPlugin.View/Helper');` will setup the helper class to be found in plugin's helper package + * + * @param string $className the name of the class to configure package for + * @param string $location the package name + */ + public static function uses($className, $location) { + self::$__classMap[$className] = $location; + } + +/** + * Method to handle the automatic class loading. It will look for each class' package + * defined using App::uses() and with this information it will resolve the package name to a full path + * to load the class from. File name for each class should follow the class name. For instance, + * if a class is name `MyCustomClass` the file name should be `MyCustomClass.php` + * + * @param string $className the name of the class to load + */ + public static function load($className) { + if (isset(self::$__classMap[$className])) { + if ($file = self::__mapped($className)) { + return include $file; + } + + $parts = explode('.', self::$__classMap[$className], 2); + list($plugin, $package) = count($parts) > 1 ? $parts : array(null, current($parts)); + $paths = self::path($package, $plugin); + + if (empty($plugin)) { + $appLibs = empty(self::$__packages['Lib']) ? APPLIBS : current(self::$__packages['Lib']); + $paths[] = $appLibs . $package . DS; + $paths[] = LIBS . $package . DS; + } + + foreach ($paths as $path) { + $file = $path . $className . '.php'; + if (file_exists($file)) { + self::__map($file, $className); + return include $file; + } + } + + //To help apps migrate to 2.0 old style file names are allowed + foreach ($paths as $path) { + $underscored = Inflector::underscore($className); + $tries = array($path . $underscored . '.php'); + $parts = explode('_', $underscored); + if (count($parts) > 1) { + array_pop($parts); + $tries[] = $path . implode('_', $parts) . '.php'; + } + foreach ($tries as $file) { + if (file_exists($file)) { + self::__map($file, $className); + return include $file; + } + } + } + } + + return false; + } + +/** + * Finds classes based on $name or specific file(s) to search. Calling App::import() will + * not construct any classes contained in the files. It will only find and require() the file. + * + * @link http://book.cakephp.org/view/934/Using-App-import + * @param mixed $type The type of Class if passed as a string, or all params can be passed as + * an single array to $type, + * @param string $name Name of the Class or a unique name for the file + * @param mixed $parent boolean true if Class Parent should be searched, accepts key => value + * array('parent' => $parent ,'file' => $file, 'search' => $search, 'ext' => '$ext'); + * $ext allows setting the extension of the file name + * based on Inflector::underscore($name) . ".$ext"; + * @param array $search paths to search for files, array('path 1', 'path 2', 'path 3'); + * @param string $file full name of the file to search for including extension + * @param boolean $return, return the loaded file, the file must have a return + * statement in it to work: return $variable; + * @return boolean true if Class is already in memory or if file is found and loaded, false if not + */ + public static function import($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false) { + $ext = $plugin = $directory = null; + + if (is_array($type)) { + extract($type, EXTR_OVERWRITE); + } + + if (is_array($parent)) { + extract($parent, EXTR_OVERWRITE); + } + + if ($name == null && $file == null) { + return false; + } + + if (is_array($name)) { + foreach ($name as $class) { + if (!App::import(compact('type', 'parent', 'search', 'file', 'return') + array('name' => $class))) { + return false; + } + } + return true; + } + + $originalType = $type = strtolower($type); + $specialPackage = in_array($type, array('file', 'vendor')); + if (!$specialPackage && isset(self::$legacy[$type . 's'])) { + $type = self::$legacy[$type . 's']; + } + list($plugin, $name) = pluginSplit($name); + if (!empty($plugin)) { + $plugin = Inflector::camelize($plugin); + } + + if (!$specialPackage) { + return self::_loadClass($name, $plugin, $type, $originalType, $parent); + } + + if ($type == 'file' && !empty($file)) { + return self::_loadFile($name, $plugin, $search, $file, $return); + } + + if ($type == 'vendor') { + return self::_loadVendor($name, $plugin, $file, $ext); + } + + return false; + } + +/** + * Helper function to include classes + * This is a compatibility wrapper around using App::uses() and automatic class loading + * + * @param string $name unique name of the file for identifying it inside the application + * @param string $plugin camel cased plugin name if any + * @param string $type name of the packed where the class is located + * @param string $file filename if known, the $name param will be used otherwise + * @param string $originalType type name as supplied initially by the user + * @param boolean $parent whether to load the class parent or not + * @return boolean true indicating the successful load and existence of the class + */ + private function _loadClass($name, $plugin, $type, $originalType, $parent) { + if ($type == 'Console/Command' && $name == 'Shell') { + $type = 'Console'; + } else if (isset(self::$types[$originalType]['suffix'])) { + $suffix = self::$types[$originalType]['suffix']; + $name .= ($suffix == $name) ? '' : $suffix; + } + + if ($parent && isset(self::$types[$originalType]['extends'])) { + $extends = self::$types[$originalType]['extends']; + App::uses($extends, $type); + if ($plugin && in_array($originalType, array('controller', 'model'))) { + App::uses($plugin . $extends, $plugin . '.' .$type); + } + } + if ($plugin) { + $plugin .= '.'; + } + $name = Inflector::camelize($name); + App::uses($name, $plugin . $type); + return class_exists($name); + } + +/** + * Helper function to include single files + * + * @param string $name unique name of the file for identifying it inside the application + * @param string $plugin camel cased plugin name if any + * @param array $search list of paths to search the file into + * @param string $file filename if known, the $name param will be used otherwise + * @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice + * @return mixed, if $return contents of the file after php parses it, boolean indicating success otherwise + */ + private function _loadFile($name, $plugin, $search, $file, $return) { + $mapped = self::__mapped($name, $plugin); + if ($mapped) { + $file = $mapped; + } else if (!empty($search)) { + foreach ($search as $path) { + $found = false; + if (file_exists($path . $file)) { + $file = $path . $file; + $found = true; + break; + } + if (empty($found)) { + $file = false; + } + } + } + if (!empty($file) && file_exists($file)) { + self::__map($file, $name, $plugin); + $returnValue = include $file; + if ($return) { + return $returnValue; + } + return (bool) $returnValue; + } + return false; + } + +/** + * Helper function to load files from vendors folders + * + * @param string $name unique name of the file for identifying it inside the application + * @param string $plugin camel cased plugin name if any + * @param string $file file name if known + * @param string $ext file extension if known + * @return boolean true if the file was loaded successfully, false otherwise + */ + private function _loadVendor($name, $plugin, $file, $ext) { + if ($mapped = self::__mapped($name, $plugin)) { + return (bool) include_once($mapped); + } + $fileTries = array(); + $paths = ($plugin) ? App::path('vendors', $plugin) : App::path('vendors'); + if (empty($ext)) { + $ext = 'php'; + } + if (empty($file)) { + $fileTries[] = $name . '.' . $ext; + $fileTries[] = Inflector::underscore($name) . '.' . $ext; + } else { + $fileTries[] = $file; + } + + foreach ($fileTries as $file) { + foreach ($paths as $path) { + if (file_exists($path . $file)) { + self::__map($path . $file, $name, $plugin); + return (bool) include($path . $file); + } + } + } + return false; + } + +/** + * Initializes the cache for App, registers a shutdown function. + * + * @return void + */ + public static function init() { + self::$__map = (array)Cache::read('file_map', '_cake_core_'); + self::$__objects = (array)Cache::read('object_map', '_cake_core_'); + register_shutdown_function(array('App', 'shutdown')); + } + +/** + * Maps the $name to the $file. + * + * @param string $file full path to file + * @param string $name unique name for this map + * @param string $plugin camelized if object is from a plugin, the name of the plugin + * @return void + * @access private + */ + private static function __map($file, $name, $plugin = null) { + if ($plugin) { + self::$__map['Plugin'][$plugin][$name] = $file; + } else { + self::$__map[$name] = $file; + } + self::$_cacheChange = true; + } + +/** + * Returns a file's complete path. + * + * @param string $name unique name + * @param string $plugin camelized if object is from a plugin, the name of the plugin + * @return mixed, file path if found, false otherwise + * @access private + */ + private static function __mapped($name, $plugin = null) { + if ($plugin) { + if (isset(self::$__map['Plugin'][$plugin][$name])) { + return self::$__map['Plugin'][$plugin][$name]; + } + return false; + } + + if (isset(self::$__map[$name])) { + return self::$__map[$name]; + } + return false; + } + +/** + * Object destructor. + * + * Writes cache file if changes have been made to the $__map or $__paths + * + * @return void + */ + public static function shutdown() { + if (self::$__cache && self::$_cacheChange) { + Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); + } + if (self::$__cache && self::$_objectCacheChange) { + Cache::write('object_map', self::$__objects, '_cake_core_'); + } + } +} \ No newline at end of file diff --git a/cake/libs/configure.php b/lib/Cake/Core/Configure.php similarity index 94% rename from cake/libs/configure.php rename to lib/Cake/Core/Configure.php index 97b54b3e9..ee139eb54 100644 --- a/cake/libs/configure.php +++ b/lib/Cake/Core/Configure.php @@ -21,7 +21,7 @@ * Configuration class. Used for managing runtime configuration information. * * Provides features for reading and writing to the runtime configuration, as well - * as methods for loading additional configuration files or storing runtime configuration + * as methods for loading additional configuration files or storing runtime configuration * for future use. * * @package cake.libs @@ -70,13 +70,13 @@ class Configure { )); if (!include(CONFIGS . 'core.php')) { - trigger_error(__("Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR); + trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR); } App::init(); App::build(); if (!include(CONFIGS . 'bootstrap.php')) { - trigger_error(__("Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR); + trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", CONFIGS), E_USER_ERROR); } $level = -1; if (isset(self::$_values['Error']['level'])) { @@ -224,7 +224,7 @@ class Configure { } /** - * Add a new reader to Configure. Readers allow you to read configuration + * Add a new reader to Configure. Readers allow you to read configuration * files in various formats/storage locations. CakePHP comes with two built-in readers * PhpReader and IniReader. You can also implement your own reader classes in your application. * @@ -232,7 +232,7 @@ class Configure { * * `Configure::config('ini', new IniReader());` * - * @param string $name The name of the reader being configured. This alias is used later to + * @param string $name The name of the reader being configured. This alias is used later to * read values from a specific reader. * @param ConfigReaderInterface $reader The reader to append. * @return void @@ -254,7 +254,7 @@ class Configure { } /** - * Remove a configured reader. This will unset the reader + * Remove a configured reader. This will unset the reader * and make any future attempts to use it cause an Exception. * * @param string $name Name of the reader to drop. @@ -276,7 +276,7 @@ class Configure { * runtime configuration. You can load configuration files from plugins * by preceding the filename with the plugin name. * - * `Configure::load('Users.user', 'default')` + * `Configure::load('Users.user', 'default')` * * Would load the 'user' config file using the default config reader. You can load * app config files by giving the name of the resource you want loaded. @@ -318,7 +318,7 @@ class Configure { */ public static function version() { if (!isset(self::$_values['Cake']['version'])) { - require(CORE_PATH . 'cake' . DS . 'config' . DS . 'config.php'); + require(LIBS . 'config' . DS . 'config.php'); self::write($config); } return self::$_values['Cake']['version']; @@ -369,7 +369,7 @@ interface ConfigReaderInterface { * These sources can either be static resources like files, or dynamic ones like * a database, or other datasource. * - * @param string $key + * @param string $key * @return array An array of data to merge into the runtime configuration */ function read($key); diff --git a/cake/libs/object.php b/lib/Cake/Core/Object.php similarity index 99% rename from cake/libs/object.php rename to lib/Cake/Core/Object.php index 9096ae121..28a3d0d29 100644 --- a/cake/libs/object.php +++ b/lib/Cake/Core/Object.php @@ -20,6 +20,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Set', 'Utility'); + /** * Object class provides a few generic methods used in several subclasses. * @@ -64,9 +66,7 @@ class Object { if (empty($url)) { return false; } - if (!class_exists('dispatcher')) { - require LIBS . 'dispatcher.php'; - } + App::uses('Dispatcher', 'Routing'); if (in_array('return', $extra, true)) { $extra = array_merge($extra, array('return' => 0, 'autoRender' => 1)); } diff --git a/cake/libs/error/error_handler.php b/lib/Cake/Error/ErrorHandler.php similarity index 94% rename from cake/libs/error/error_handler.php rename to lib/Cake/Error/ErrorHandler.php index 775bd8d43..6787e23f7 100644 --- a/cake/libs/error/error_handler.php +++ b/lib/Cake/Error/ErrorHandler.php @@ -19,6 +19,11 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Debugger', 'Utility'); +App::uses('CakeLog', 'Log'); +App::uses('ExceptionRenderer', 'Error'); +App::uses('AppController', 'Controller'); + /** * * Error Handler provides basic error and exception handling for your application. It captures and @@ -102,12 +107,8 @@ class ErrorHandler { * @see http://php.net/manual/en/function.set-exception-handler.php */ public static function handleException(Exception $exception) { - App::import('Core', 'error/ExceptionRenderer'); $config = Configure::read('Exception'); if (!empty($config['log'])) { - if (!class_exists('CakeLog')) { - require LIBS . 'cake_log.php'; - } $message = sprintf("[%s] %s\n%s", get_class($exception), $exception->getMessage(), @@ -116,7 +117,7 @@ class ErrorHandler { CakeLog::write(LOG_ERR, $message); } if ($config['renderer'] !== 'ExceptionRenderer') { - App::import('Lib', $config['renderer']); + App::uses($config['renderer'], 'Error'); } $error = new $config['renderer']($exception); $error->render(); @@ -146,9 +147,6 @@ class ErrorHandler { $debug = Configure::read('debug'); if ($debug) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $data = array( 'level' => $log, 'code' => $code, @@ -162,14 +160,8 @@ class ErrorHandler { ); return Debugger::getInstance()->outputError($data); } else { - if (!class_exists('CakeLog')) { - require LIBS . 'cake_log.php'; - } $message = $error . ' (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']'; if (!empty($errorConfig['trace'])) { - if (!class_exists('Debugger')) { - require LIBS . 'debugger.php'; - } $trace = Debugger::trace(array('start' => 1, 'format' => 'log')); $message .= "\nTrace:\n" . $trace . "\n"; } diff --git a/cake/libs/error/exception_renderer.php b/lib/Cake/Error/ExceptionRenderer.php similarity index 96% rename from cake/libs/error/exception_renderer.php rename to lib/Cake/Error/ExceptionRenderer.php index 328fffd8d..761aae0c4 100644 --- a/cake/libs/error/exception_renderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -19,6 +19,10 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('Sanitize', 'Utility'); +App::uses('Router', 'Routing'); + /** * Exception Renderer. * @@ -86,8 +90,6 @@ class ExceptionRenderer { * @param array $messages Error messages */ function __construct(Exception $exception) { - App::import('Core', 'Sanitize'); - $this->controller = $this->_getController($exception); if (method_exists($this->controller, 'apperror')) { @@ -142,7 +144,7 @@ class ExceptionRenderer { */ protected function _getController($exception) { static $__previousError = null; - App::import('Controller', 'CakeError'); + App::uses('CakeErrorController', 'Controller'); if ($__previousError != $exception) { $__previousError = $exception; @@ -193,7 +195,7 @@ class ExceptionRenderer { public function error400($error) { $message = $error->getMessage(); if (Configure::read('debug') == 0 && $error instanceof CakeException) { - $message = __('Not Found'); + $message = __d('cake', 'Not Found'); } $url = $this->controller->request->here(); $this->controller->response->statusCode($error->getCode()); @@ -215,7 +217,7 @@ class ExceptionRenderer { $code = ($error->getCode() > 500) ? $error->getCode() : 500; $this->controller->response->statusCode($code); $this->controller->set(array( - 'name' => __('An Internal Error Has Occurred'), + 'name' => __d('cake', 'An Internal Error Has Occurred'), 'message' => h($url), 'error' => $error, )); diff --git a/cake/libs/error/exceptions.php b/lib/Cake/Error/exceptions.php similarity index 88% rename from cake/libs/error/exceptions.php rename to lib/Cake/Error/exceptions.php index 7baa957c1..d178005b6 100644 --- a/cake/libs/error/exceptions.php +++ b/lib/Cake/Error/exceptions.php @@ -20,12 +20,14 @@ /** * Parent class for all of the HTTP related exceptions in CakePHP. - * All HTTP status/error related exceptions should extend this class so + * All HTTP status/error related exceptions should extend this class so * catch blocks can be specifically typed. * * @package cake.libs */ -class HttpException extends RuntimeException { } +if (!class_exists('HttpException')) { + class HttpException extends RuntimeException { } +} /** * Represents an HTTP 400 error. @@ -182,7 +184,7 @@ class CakeException extends RuntimeException { public function __construct($message, $code = 500) { if (is_array($message)) { $this->_attributes = $message; - $message = __($this->_messageTemplate, $message); + $message = __d('cake_dev', $this->_messageTemplate, $message); } parent::__construct($message, $code); } @@ -198,12 +200,12 @@ class CakeException extends RuntimeException { } /** - * Missing Controller exception - used when a controller + * Missing Controller exception - used when a controller * cannot be found. * * @package cake.libs */ -class MissingControllerException extends CakeException { +class MissingControllerException extends CakeException { protected $_messageTemplate = 'Controller class %s could not be found.'; public function __construct($message, $code = 404) { @@ -212,12 +214,12 @@ class MissingControllerException extends CakeException { } /** - * Missing Action exception - used when a controller action + * Missing Action exception - used when a controller action * cannot be found. * * @package cake.libs */ -class MissingActionException extends CakeException { +class MissingActionException extends CakeException { protected $_messageTemplate = 'Action %s::%s() could not be found.'; public function __construct($message, $code = 404) { @@ -225,12 +227,12 @@ class MissingActionException extends CakeException { } } /** - * Private Action exception - used when a controller action + * Private Action exception - used when a controller action * is protected, or starts with a `_`. * * @package cake.libs */ -class PrivateActionException extends CakeException { +class PrivateActionException extends CakeException { protected $_messageTemplate = 'Private Action %s::%s() is not directly accessible.'; public function __construct($message, $code = 404, Exception $previous = null) { @@ -243,7 +245,7 @@ class PrivateActionException extends CakeException { * * @package cake.libs */ -class MissingComponentFileException extends CakeException { +class MissingComponentFileException extends CakeException { protected $_messageTemplate = 'Component File "%s" is missing.'; } @@ -252,7 +254,7 @@ class MissingComponentFileException extends CakeException { * * @package cake.libs */ -class MissingComponentClassException extends CakeException { +class MissingComponentClassException extends CakeException { protected $_messageTemplate = 'Component class "%s" is missing.'; } @@ -275,7 +277,7 @@ class MissingBehaviorClassException extends CakeException { } * * @package cake.libs */ -class MissingViewException extends CakeException { +class MissingViewException extends CakeException { protected $_messageTemplate = 'View file "%s" is missing.'; } @@ -284,7 +286,7 @@ class MissingViewException extends CakeException { * * @package cake.libs */ -class MissingLayoutException extends CakeException { +class MissingLayoutException extends CakeException { protected $_messageTemplate = 'Layout file "%s" is missing.'; } @@ -293,7 +295,7 @@ class MissingLayoutException extends CakeException { * * @package cake.libs */ -class MissingHelperFileException extends CakeException { +class MissingHelperFileException extends CakeException { protected $_messageTemplate = 'Helper File "%s" is missing.'; } @@ -302,7 +304,7 @@ class MissingHelperFileException extends CakeException { * * @package cake.libs */ -class MissingHelperClassException extends CakeException { +class MissingHelperClassException extends CakeException { protected $_messageTemplate = 'Helper class "%s" is missing.'; } @@ -330,7 +332,7 @@ class MissingConnectionException extends CakeException { * * @package cake.libs */ -class MissingTaskFileException extends CakeException { +class MissingTaskFileException extends CakeException { protected $_messageTemplate = 'Task file "%s" is missing.'; } @@ -339,7 +341,7 @@ class MissingTaskFileException extends CakeException { * * @package cake.libs */ -class MissingTaskClassException extends CakeException { +class MissingTaskClassException extends CakeException { protected $_messageTemplate = 'Task class "%s" is missing.'; } @@ -348,7 +350,7 @@ class MissingTaskClassException extends CakeException { * * @package cake.libs */ -class MissingShellMethodException extends CakeException { +class MissingShellMethodException extends CakeException { protected $_messageTemplate = "Unknown command %1\$s %2\$s.\nFor usage try `cake %1\$s --help`"; } @@ -357,7 +359,7 @@ class MissingShellMethodException extends CakeException { * * @package cake.libs */ -class MissingShellClassException extends CakeException { +class MissingShellClassException extends CakeException { protected $_messageTemplate = "Shell class %s could not be loaded."; } @@ -366,7 +368,7 @@ class MissingShellClassException extends CakeException { * * @package cake.libs */ -class MissingShellFileException extends CakeException { +class MissingShellFileException extends CakeException { protected $_messageTemplate = "Shell file %s could not be loaded."; } @@ -406,6 +408,15 @@ class MissingModelException extends CakeException { protected $_messageTemplate = 'Model %s could not be found.'; } +/** + * Exception Raised when a test loader could not be found + * + * @package cake.libs + */ +class MissingTestLoaderException extends CakeException { + protected $_messageTemplate = 'Test loader %s could not be found.'; +} + /** * Exception class for Cache. This exception will be thrown from Cache when it @@ -470,4 +481,3 @@ class XmlException extends CakeException { } * @package cake.libs */ class ConsoleException extends CakeException { } - diff --git a/cake/libs/i18n.php b/lib/Cake/I18n/I18n.php similarity index 99% rename from cake/libs/i18n.php rename to lib/Cake/I18n/I18n.php index b140790d4..e05e1bcdc 100644 --- a/cake/libs/i18n.php +++ b/lib/Cake/I18n/I18n.php @@ -20,8 +20,8 @@ /** * Included libraries. */ -App::import('Core', 'L10n'); -App::import('Core', 'Multibyte'); +App::uses('L10n', 'I18n'); +App::uses('Multibyte', 'I18n'); /** * I18n handles translation of Text and time format strings. @@ -99,7 +99,7 @@ class I18n { /** * Used by the translation functions in basics.php - * Can also be used like I18n::translate(); but only if the App::import('I18n'); has been used to load the class. + * Returns a translated string based on current language and translation files stored in locale folder * * @param string $singular String to translate * @param string $plural Plural string (if any) diff --git a/cake/libs/l10n.php b/lib/Cake/I18n/L10n.php similarity index 99% rename from cake/libs/l10n.php rename to lib/Cake/I18n/L10n.php index 2da41af34..c9bef1e79 100644 --- a/cake/libs/l10n.php +++ b/lib/Cake/I18n/L10n.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0.4116 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'CakeRequest'); +App::uses('CakeRequest', 'Network'); /** * Localization diff --git a/cake/libs/multibyte.php b/lib/Cake/I18n/Multibyte.php similarity index 99% rename from cake/libs/multibyte.php rename to lib/Cake/I18n/Multibyte.php index 123d3d11b..9ad06c093 100644 --- a/cake/libs/multibyte.php +++ b/lib/Cake/I18n/Multibyte.php @@ -1076,7 +1076,7 @@ class Multibyte { return null; } if (!Configure::configured('_cake_core_')) { - App::import('Core', 'config/PhpReader'); + App::uses('PhpReader', 'Configure'); Configure::config('_cake_core_', new PhpReader(CAKE . 'config' . DS)); } Configure::load('unicode' . DS . 'casefolding' . DS . $range, '_cake_core_'); diff --git a/cake/LICENSE.txt b/lib/Cake/LICENSE.txt similarity index 100% rename from cake/LICENSE.txt rename to lib/Cake/LICENSE.txt diff --git a/cake/libs/cake_log.php b/lib/Cake/Log/CakeLog.php similarity index 85% rename from cake/libs/cake_log.php rename to lib/Cake/Log/CakeLog.php index 53b29af93..8305d4fba 100644 --- a/cake/libs/cake_log.php +++ b/lib/Cake/Log/CakeLog.php @@ -36,22 +36,6 @@ define('LOG_INFO', 6); } -/** - * CakeLogStreamInterface is the interface that should be implemented - * by all classes that are going to be used as Log streams. - * - * @package cake.libs - */ -interface CakeLogInterface { -/** - * Write method to handle writes being made to the Logger - * - * @param string $type - * @param string $message - * @return void - */ - public function write($type, $message); -} /** * Logs messages to configured Log adapters. One or more adapters can be configured @@ -98,7 +82,7 @@ class CakeLog { */ public static function config($key, $config) { if (empty($config['engine'])) { - throw new CakeLogException(__('Missing logger classname')); + throw new CakeLogException(__d('cake_dev', 'Missing logger classname')); } $loggerName = $config['engine']; unset($config['engine']); @@ -106,7 +90,7 @@ class CakeLog { $logger = new $className($config); if (!$logger instanceof CakeLogInterface) { throw new CakeLogException(sprintf( - __('logger class %s does not implement a write method.'), $loggerName + __d('cake_dev', 'logger class %s does not implement a write method.'), $loggerName )); } self::$_streams[$key] = $logger; @@ -121,17 +105,11 @@ class CakeLog { * @return mixed boolean false on any failures, string of classname to use if search was successful. */ protected static function _getLogger($loggerName) { - list($plugin, $loggerName) = pluginSplit($loggerName); + list($plugin, $loggerName) = pluginSplit($loggerName, true); - if ($plugin) { - App::import('Lib', $plugin . '.log/' . $loggerName); - } else { - if (!App::import('Lib', 'log/' . $loggerName)) { - App::import('Core', 'log/' . $loggerName); - } - } + App::uses($loggerName, $plugin . 'Log/Engine'); if (!class_exists($loggerName)) { - throw new CakeLogException(__('Could not load class %s', $loggerName)); + throw new CakeLogException(__d('cake_dev', 'Could not load class %s', $loggerName)); } return $loggerName; } @@ -162,9 +140,7 @@ class CakeLog { * @return void */ protected static function _autoConfig() { - if (!class_exists('FileLog')) { - App::import('Core', 'log/FileLog'); - } + self::_getLogger('FileLog'); self::$_streams['default'] = new FileLog(array('path' => LOGS)); } @@ -219,4 +195,4 @@ class CakeLog { } return true; } -} \ No newline at end of file +} diff --git a/lib/Cake/Log/CakeLogInterface.php b/lib/Cake/Log/CakeLogInterface.php new file mode 100644 index 000000000..0b2cd1a3c --- /dev/null +++ b/lib/Cake/Log/CakeLogInterface.php @@ -0,0 +1,18 @@ + $name, 'alias' => $name)); if (empty($model)) { - trigger_error(__("Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias), E_USER_WARNING); + trigger_error(__d('cake_dev', "Model class '%s' not found in AclNode::node() when trying to bind %s object", $type, $this->alias), E_USER_WARNING); return null; } @@ -181,141 +178,9 @@ class AclNode extends AppModel { $result = $db->read($this, $queryData, -1); if (!$result) { - trigger_error(__("AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)), E_USER_WARNING); + trigger_error(__d('cake_dev', "AclNode::node() - Couldn't find %s node identified by \"%s\"", $type, print_r($ref, true)), E_USER_WARNING); } } return $result; } } - -/** - * Access Control Object - * - * @package cake.libs.model - */ -class Aco extends AclNode { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'Aco'; - -/** - * Binds to ARO nodes through permissions settings - * - * @var array - * @access public - */ - public $hasAndBelongsToMany = array('Aro' => array('with' => 'Permission')); -} - -/** - * Action for Access Control Object - * - * @package cake.libs.model - */ -class AcoAction extends AppModel { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'AcoAction'; - -/** - * ACO Actions belong to ACOs - * - * @var array - * @access public - */ - public $belongsTo = array('Aco'); -} - -/** - * Access Request Object - * - * @package cake.libs.model - */ -class Aro extends AclNode { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'Aro'; - -/** - * AROs are linked to ACOs by means of Permission - * - * @var array - * @access public - */ - public $hasAndBelongsToMany = array('Aco' => array('with' => 'Permission')); -} - -/** - * Permissions linking AROs with ACOs - * - * @package cake.libs.model - */ -class Permission extends AppModel { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'Permission'; - -/** - * Explicitly disable in-memory query caching - * - * @var boolean - * @access public - */ - public $cacheQueries = false; - -/** - * Override default table name - * - * @var string - * @access public - */ - public $useTable = 'aros_acos'; - -/** - * Permissions link AROs with ACOs - * - * @var array - * @access public - */ - public $belongsTo = array('Aro', 'Aco'); - -/** - * No behaviors for this model - * - * @var array - * @access public - */ - public $actsAs = null; - -/** - * Constructor, used to tell this model to use the - * database configured for ACL - */ - function __construct() { - $config = Configure::read('Acl.database'); - if (!empty($config)) { - $this->useDbConfig = $config; - } - parent::__construct(); - } -} diff --git a/lib/Cake/Model/Aco.php b/lib/Cake/Model/Aco.php new file mode 100644 index 000000000..f8a92bcf4 --- /dev/null +++ b/lib/Cake/Model/Aco.php @@ -0,0 +1,48 @@ + array('with' => 'Permission')); +} \ No newline at end of file diff --git a/lib/Cake/Model/AcoAction.php b/lib/Cake/Model/AcoAction.php new file mode 100644 index 000000000..fe9734228 --- /dev/null +++ b/lib/Cake/Model/AcoAction.php @@ -0,0 +1,48 @@ + array('with' => 'Permission')); +} diff --git a/cake/libs/model/behaviors/acl.php b/lib/Cake/Model/Behavior/AclBehavior.php similarity index 97% rename from cake/libs/model/behaviors/acl.php rename to lib/Cake/Model/Behavior/AclBehavior.php index 6a347bba6..ae72d960e 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -58,7 +58,7 @@ class AclBehavior extends ModelBehavior { $model->{$type} = ClassRegistry::init($type); } if (!method_exists($model, 'parentNode')) { - trigger_error(__('Callback parentNode() not defined in %s', $model->alias), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Callback parentNode() not defined in %s', $model->alias), E_USER_WARNING); } } diff --git a/cake/libs/model/behaviors/containable.php b/lib/Cake/Model/Behavior/ContainableBehavior.php similarity index 99% rename from cake/libs/model/behaviors/containable.php rename to lib/Cake/Model/Behavior/ContainableBehavior.php index 03963a723..3c76f2a73 100644 --- a/cake/libs/model/behaviors/containable.php +++ b/lib/Cake/Model/Behavior/ContainableBehavior.php @@ -359,7 +359,7 @@ class ContainableBehavior extends ModelBehavior { if (!isset($Model->{$name}) || !is_object($Model->{$name})) { if ($throwErrors) { - trigger_error(__('Model "%s" is not associated with model "%s"', $Model->alias, $name), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Model "%s" is not associated with model "%s"', $Model->alias, $name), E_USER_WARNING); } continue; } diff --git a/cake/libs/model/behaviors/translate.php b/lib/Cake/Model/Behavior/TranslateBehavior.php similarity index 98% rename from cake/libs/model/behaviors/translate.php rename to lib/Cake/Model/Behavior/TranslateBehavior.php index ff7c9bdc5..48c3d36e3 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('I18n', 'I18n'); + /** * Translate behavior * @@ -53,7 +55,7 @@ class TranslateBehavior extends ModelBehavior { $db = ConnectionManager::getDataSource($model->useDbConfig); if (!$db->connected) { trigger_error( - __('Datasource %s for TranslateBehavior of model %s is not connected', $model->useDbConfig, $model->alias), + __d('cake_dev', 'Datasource %s for TranslateBehavior of model %s is not connected', $model->useDbConfig, $model->alias), E_USER_ERROR ); return false; @@ -335,9 +337,6 @@ class TranslateBehavior extends ModelBehavior { */ protected function _getLocale($model) { if (!isset($model->locale) || is_null($model->locale)) { - if (!class_exists('I18n')) { - App::import('Core', 'i18n'); - } $I18n = I18n::getInstance(); $I18n->l10n->get(Configure::read('Config.language')); $model->locale = $I18n->l10n->locale; @@ -427,7 +426,7 @@ class TranslateBehavior extends ModelBehavior { foreach (array('hasOne', 'hasMany', 'belongsTo', 'hasAndBelongsToMany') as $type) { if (isset($model->{$type}[$association]) || isset($model->__backAssociation[$type][$association])) { trigger_error( - __('Association %s is already binded to model %s', $association, $model->alias), + __d('cake_dev', 'Association %s is already binded to model %s', $association, $model->alias), E_USER_ERROR ); return false; diff --git a/cake/libs/model/behaviors/tree.php b/lib/Cake/Model/Behavior/TreeBehavior.php similarity index 100% rename from cake/libs/model/behaviors/tree.php rename to lib/Cake/Model/Behavior/TreeBehavior.php diff --git a/cake/libs/model/behavior_collection.php b/lib/Cake/Model/BehaviorCollection.php similarity index 94% rename from cake/libs/model/behavior_collection.php rename to lib/Cake/Model/BehaviorCollection.php index 8bd92198f..82cb3ed77 100644 --- a/cake/libs/model/behavior_collection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -18,6 +18,9 @@ * @since CakePHP(tm) v 1.2.0.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('ObjectCollection', 'Utility'); + /** * Model behavior collection class. * @@ -94,26 +97,21 @@ class BehaviorCollection extends ObjectCollection { * @param string $behavior CamelCased name of the behavior to load * @param array $config Behavior configuration parameters * @return boolean True on success, false on failure - * @throws MissingBehaviorFileException or MissingBehaviorClassException when a behavior could not be found. + * @throws MissingBehaviorClassException when a behavior could not be found. */ public function load($behavior, $config = array()) { if (is_array($config) && isset($config['className'])) { $alias = $behavior; $behavior = $config['className']; } - list($plugin, $name) = pluginSplit($behavior); + list($plugin, $name) = pluginSplit($behavior, true); if (!isset($alias)) { $alias = $name; } $class = $name . 'Behavior'; - if (!App::import('Behavior', $behavior)) { - throw new MissingBehaviorFileException(array( - 'file' => Inflector::underscore($behavior) . '.php', - 'class' => $class - )); - } + App::uses($class, $plugin . 'Model/Behavior'); if (!class_exists($class)) { throw new MissingBehaviorClassException(array( 'file' => Inflector::underscore($behavior) . '.php', @@ -221,7 +219,7 @@ class BehaviorCollection extends ObjectCollection { $method = $this->hasMethod($method, true); if ($strict && empty($method)) { - trigger_error(__("BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", $method), E_USER_WARNING); + trigger_error(__d('cake_dev', "BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", $method), E_USER_WARNING); return null; } if (empty($method)) { diff --git a/cake/libs/model/cake_schema.php b/lib/Cake/Model/CakeSchema.php similarity index 96% rename from cake/libs/model/cake_schema.php rename to lib/Cake/Model/CakeSchema.php index 5579540b0..67f1cb87a 100644 --- a/cake/libs/model/cake_schema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -16,8 +16,9 @@ * @since CakePHP(tm) v 1.2.0.5550 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Model'); -App::import('Core', 'ConnectionManager'); +App::uses('Model', 'Model'); +App::uses('AppModel', 'Model'); +App::uses('ConnectionManager', 'Model'); /** * Base Class for Schema management @@ -204,9 +205,8 @@ class CakeSchema extends Object { )); $db = ConnectionManager::getDataSource($connection); - App::import('Model', 'AppModel'); if (isset($this->plugin)) { - App::import('Model', Inflector::camelize($this->plugin) . 'AppModel'); + App::uses(Inflector::camelize($this->plugin) . 'AppModel', $this->plugin . '.Model'); } $tables = array(); @@ -219,21 +219,29 @@ class CakeSchema extends Object { if (!is_array($models) && $models !== false) { if (isset($this->plugin)) { - $models = App::objects('model', App::pluginPath($this->plugin) . 'models' . DS, false); + $models = App::objects($this->plugin . '.Model', null, false); } else { - $models = App::objects('model'); + $models = App::objects('Model'); } } if (is_array($models)) { foreach ($models as $model) { $importModel = $model; + $plugin = null; if (isset($this->plugin)) { - $importModel = $this->plugin . '.' . $model; + if ($model == $this->plugin . 'AppModel') { + continue; + } + $importModel = $model; + $plugin = $this->plugin . '.'; } - if (!App::import('Model', $importModel)) { + + App::uses($importModel, $plugin . 'Model'); + if (!class_exists($importModel)) { continue; } + $vars = get_class_vars($model); if (empty($vars['useDbConfig']) || $vars['useDbConfig'] != $connection) { continue; @@ -584,7 +592,7 @@ class CakeSchema extends Object { $value['key'] = 'primary'; } if (!isset($db->columns[$value['type']])) { - trigger_error(__('Schema generation error: invalid column type %s does not exist in DBO', $value['type']), E_USER_NOTICE); + trigger_error(__d('cake_dev', 'Schema generation error: invalid column type %s does not exist in DBO', $value['type']), E_USER_NOTICE); continue; } else { $defaultCol = $db->columns[$value['type']]; diff --git a/cake/libs/model/connection_manager.php b/lib/Cake/Model/ConnectionManager.php similarity index 54% rename from cake/libs/model/connection_manager.php rename to lib/Cake/Model/ConnectionManager.php index 568b203a2..0f0ac3435 100644 --- a/cake/libs/model/connection_manager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -18,7 +18,8 @@ * @since CakePHP(tm) v 0.10.x.1402 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require LIBS . 'model' . DS . 'datasources' . DS . 'datasource.php'; + +App::uses('DataSource', 'Model/Datasource'); config('database'); /** @@ -34,7 +35,7 @@ class ConnectionManager { * @var DATABASE_CONFIG * @access public */ - public $config = null; + public static $config = null; /** * Holds instances DataSource objects @@ -42,7 +43,7 @@ class ConnectionManager { * @var array * @access protected */ - protected $_dataSources = array(); + protected static $_dataSources = array(); /** * Contains a list of all file and class names used in Connection settings @@ -50,32 +51,26 @@ class ConnectionManager { * @var array * @access protected */ - protected $_connectionsEnum = array(); + protected static $_connectionsEnum = array(); /** - * Constructor. + * Indicates if the init code for this class has alredy been executed + * + * @var boolean + */ + private static $_init = false; + +/** + * Loads connections configuration. * */ - function __construct() { + private static function init() { + include_once CONFIGS . 'database.php'; if (class_exists('DATABASE_CONFIG')) { - $this->config = new DATABASE_CONFIG(); - $this->_getConnectionObjects(); + self::$config = new DATABASE_CONFIG(); } - } - -/** - * Gets a reference to the ConnectionManger object instance - * - * @return object Instance - */ - public static function &getInstance() { - static $instance = array(); - - if (!$instance) { - $instance[0] = new ConnectionManager(); - } - - return $instance[0]; + register_shutdown_function('ConnectionManager::shutdown'); + self::$_init = true; } /** @@ -87,23 +82,27 @@ class ConnectionManager { * @throws MissingDatasourceFileException */ public static function getDataSource($name) { - $_this = ConnectionManager::getInstance(); - - if (!empty($_this->_dataSources[$name])) { - return $_this->_dataSources[$name]; + if (empty(self::$_init)) { + self::init(); } - if (empty($_this->_connectionsEnum[$name])) { - throw new MissingDatasourceConfigException(array('config' => $name)); + if (!empty(self::$_dataSources[$name])) { + $return = self::$_dataSources[$name]; + return $return; } - $conn = $_this->_connectionsEnum[$name]; + + if (empty(self::$_connectionsEnum[$name])) { + self::_getConnectionObject($name); + } + + self::loadDataSource($name); + $conn = self::$_connectionsEnum[$name]; $class = $conn['classname']; - $_this->loadDataSource($name); - $_this->_dataSources[$name] = new $class($_this->config->{$name}); - $_this->_dataSources[$name]->configKeyName = $name; + self::$_dataSources[$name] = new $class(self::$config->{$name}); + self::$_dataSources[$name]->configKeyName = $name; - return $_this->_dataSources[$name]; + return self::$_dataSources[$name]; } /** @@ -112,8 +111,10 @@ class ConnectionManager { * @return array List of available connections */ public static function sourceList() { - $_this = ConnectionManager::getInstance(); - return array_keys($_this->_dataSources); + if (empty(self::$_init)) { + self::init(); + } + return array_keys(self::$_dataSources); } /** @@ -124,9 +125,11 @@ class ConnectionManager { * in the ConnectionManager. */ public static function getSourceName($source) { - $_this = ConnectionManager::getInstance(); - foreach ($_this->_dataSources as $name => $ds) { - if ($ds == $source) { + if (empty(self::$_init)) { + self::init(); + } + foreach (self::$_dataSources as $name => $ds) { + if ($ds === $source) { return $name; } } @@ -143,27 +146,31 @@ class ConnectionManager { * @throws MissingDatasourceFileException */ public static function loadDataSource($connName) { - $_this = ConnectionManager::getInstance(); + if (empty(self::$_init)) { + self::init(); + } if (is_array($connName)) { $conn = $connName; } else { - $conn = $_this->_connectionsEnum[$connName]; + $conn = self::$_connectionsEnum[$connName]; } - if (class_exists($conn['classname'])) { + if (class_exists($conn['classname'], false)) { return false; } - if (!empty($conn['parent'])) { - $_this->loadDataSource($conn['parent']); + $plugin = $package = null; + if (!empty($conn['plugin'])) { + $plugin = $conn['plugin'] . '.'; + } + if (!empty($conn['package'])) { + $package = '/' . $conn['package']; } - $conn = array_merge(array('plugin' => null, 'classname' => null, 'parent' => null), $conn); - $class = "{$conn['plugin']}.{$conn['classname']}"; - - if (!App::import('Datasource', $class, !is_null($conn['plugin']))) { - throw new MissingDatasourceFileException(array('class' => $conn['classname'], 'plugin' => $conn['plugin'])); + App::uses($conn['classname'], $plugin . 'Model/Datasource' . $package); + if (!class_exists($conn['classname'])) { + throw new MissingDatasourceFileException(array('class' => $conn['classname'], 'plugin' => $plugin)); } return true; } @@ -175,8 +182,10 @@ class ConnectionManager { * (as defined in Connections), and the value is an array with keys 'filename' and 'classname'. */ public static function enumConnectionObjects() { - $_this = ConnectionManager::getInstance(); - return $_this->_connectionsEnum; + if (empty(self::$_init)) { + self::init(); + } + return (array) self::$config; } /** @@ -186,16 +195,18 @@ class ConnectionManager { * @param array $config The DataSource configuration settings * @return object A reference to the DataSource object, or null if creation failed */ - public static function &create($name = '', $config = array()) { - $_this = ConnectionManager::getInstance(); + public static function create($name = '', $config = array()) { + if (empty(self::$_init)) { + self::init(); + } - if (empty($name) || empty($config) || array_key_exists($name, $_this->_connectionsEnum)) { + if (empty($name) || empty($config) || array_key_exists($name, self::$_connectionsEnum)) { $null = null; return $null; } - $_this->config->{$name} = $config; - $_this->_connectionsEnum[$name] = $_this->__connectionData($config); - $return = $_this->getDataSource($name); + self::$config->{$name} = $config; + self::$_connectionsEnum[$name] = self::_connectionData($config); + $return = self::getDataSource($name); return $return; } @@ -204,15 +215,11 @@ class ConnectionManager { * * @return void */ - protected function _getConnectionObjects() { - $connections = get_object_vars($this->config); - - if ($connections != null) { - foreach ($connections as $name => $config) { - $this->_connectionsEnum[$name] = $this->__connectionData($config); - } + protected static function _getConnectionObject($name) { + if (!empty(self::$config->{$name})) { + self::$_connectionsEnum[$name] = self::_connectionData(self::$config->{$name}); } else { - throw new MissingConnectionException(array('class' => 'ConnectionManager')); + throw new MissingDatasourceConfigException(array('config' => $name)); } } @@ -221,44 +228,22 @@ class ConnectionManager { * * @return array An indexed array with: filename, classname, plugin and parent */ - private function __connectionData($config) { - if (!isset($config['datasource'])) { - $config['datasource'] = 'dbo'; - } - $filename = $classname = $parent = $plugin = null; + private static function _connectionData($config) { + $package = $classname = $plugin = null; - if (!empty($config['driver'])) { - $parent = $this->__connectionData(array('datasource' => $config['datasource'])); - $parentSource = preg_replace('/_source$/', '', $parent['filename']); - - list($plugin, $classname) = pluginSplit($config['driver']); - if ($plugin) { - $source = Inflector::underscore($classname); - } else { - $source = $parentSource . '_' . $config['driver']; - $classname = Inflector::camelize(strtolower($source)); - } - $filename = $parentSource . DS . $source; - } else { - list($plugin, $classname) = pluginSplit($config['datasource']); - if ($plugin) { - $filename = Inflector::underscore($classname); - } else { - $filename = Inflector::underscore($config['datasource']); - } - if (substr($filename, -7) != '_source') { - $filename .= '_source'; - } - $classname = Inflector::camelize(strtolower($filename)); + list($plugin, $classname) = pluginSplit($config['datasource']); + if (strpos($classname, '/') !== false) { + $package = dirname($classname); + $classname = basename($classname); } - return compact('filename', 'classname', 'parent', 'plugin'); + return compact('package', 'classname', 'plugin'); } /** * Destructor. * */ - function __destruct() { + public static function shutdown() { if (Configure::read('Session.defaults') == 'database' && function_exists('session_write_close')) { session_write_close(); } diff --git a/cake/libs/cake_session.php b/lib/Cake/Model/Datasource/CakeSession.php similarity index 95% rename from cake/libs/cake_session.php rename to lib/Cake/Model/Datasource/CakeSession.php index ec7a86b27..d8219c448 100644 --- a/cake/libs/cake_session.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -21,9 +21,9 @@ * @since CakePHP(tm) v .0.10.0.1222 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('Security')) { - App::import('Core', 'Security'); -} + +App::uses('Set', 'Utility'); +App::uses('Security', 'Utility'); /** * Session class for Cake. @@ -254,7 +254,7 @@ class CakeSession { self::__overwrite($_SESSION, Set::remove($_SESSION, $name)); return (self::check($name) == false); } - self::__setError(2, __("%s doesn't exist", $name)); + self::__setError(2, __d('cake_dev', "%s doesn't exist", $name)); return false; } @@ -331,11 +331,12 @@ class CakeSession { * @return boolean */ protected static function _validAgentAndTime() { + $config = self::read('Config'); $validAgent = ( Configure::read('Session.checkAgent') === false || - self::$_userAgent == self::read('Config.userAgent') + self::$_userAgent == $config['userAgent'] ); - return ($validAgent && self::$time <= self::read('Config.time')); + return ($validAgent && self::$time <= $config['time']); } /** @@ -479,7 +480,7 @@ class CakeSession { foreach ($sessionConfig['ini'] as $setting => $value) { if (ini_set($setting, $value) === false) { throw new CakeSessionException(sprintf( - __('Unable to configure the session, setting %s failed.'), + __d('cake_dev', 'Unable to configure the session, setting %s failed.'), $setting )); } @@ -511,18 +512,15 @@ class CakeSession { */ protected static function _getHandler($handler) { list($plugin, $class) = pluginSplit($handler, true); - $found = App::import('Lib', $plugin . 'session/' . $class); - if (!$found) { - App::import('Core', 'session/' . $class); - } + App::uses($class, $plugin . 'Model/Datasource/Session'); if (!class_exists($class)) { - throw new CakeSessionException(__('Could not load %s to handle the session.', $class)); + throw new CakeSessionException(__d('cake_dev', 'Could not load %s to handle the session.', $class)); } $handler = new $class(); if ($handler instanceof CakeSessionHandlerInterface) { return $handler; } - throw new CakeSessionException(__('Chosen SessionHandler does not implement CakeSessionHandlerInterface it cannot be used with an engine key.')); + throw new CakeSessionException(__d('cake_dev', 'Chosen SessionHandler does not implement CakeSessionHandlerInterface it cannot be used with an engine key.')); } /** @@ -629,14 +627,14 @@ class CakeSession { self::$valid = false; return false; } - if (self::read('Config')) { + if ($config = self::read('Config')) { $sessionConfig = Configure::read('Session'); if (self::_validAgentAndTime()) { - $time = self::read('Config.time'); + $time = $config['time']; self::write('Config.time', self::$sessionTime); if (isset($sessionConfig['autoRegenerate']) && $sessionConfig['autoRegenerate'] === true) { - $check = self::read('Config.countdown'); + $check = $config['countdown']; $check -= 1; self::write('Config.countdown', $check); diff --git a/cake/libs/model/datasources/datasource.php b/lib/Cake/Model/Datasource/DataSource.php similarity index 100% rename from cake/libs/model/datasources/datasource.php rename to lib/Cake/Model/Datasource/DataSource.php diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/lib/Cake/Model/Datasource/Database/Mssql.php similarity index 99% rename from cake/libs/model/datasources/dbo/dbo_mssql.php rename to lib/Cake/Model/Datasource/Database/Mssql.php index 91db76c5f..b09e58a77 100644 --- a/cake/libs/model/datasources/dbo/dbo_mssql.php +++ b/lib/Cake/Model/Datasource/Database/Mssql.php @@ -116,7 +116,7 @@ class DboMssql extends DboSource { function __construct($config, $autoConnect = true) { if ($autoConnect) { if (!function_exists('mssql_min_message_severity')) { - trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/"), E_USER_WARNING); + trigger_error(__d('cake_dev', "PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/"), E_USER_WARNING); } mssql_min_message_severity(15); mssql_min_error_severity(2); diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php similarity index 99% rename from cake/libs/model/datasources/dbo/dbo_mysql.php rename to lib/Cake/Model/Datasource/Database/Mysql.php index 29c98c4a0..b7b9da0eb 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DboSource', 'Model/Datasource'); + /** * MySQL DBO driver object * @@ -24,7 +26,7 @@ * * @package cake.libs.model.datasources.dbo */ -class DboMysql extends DboSource { +class Mysql extends DboSource { /** * Datasource description @@ -296,7 +298,7 @@ class DboMysql extends DboSource { $fields = false; $cols = $this->_execute('SHOW FULL COLUMNS FROM ' . $this->fullTableName($model)); if (!$cols) { - throw new CakeException(__('Could not describe table for %s', $model->name)); + throw new CakeException(__d('cake_dev', 'Could not describe table for %s', $model->name)); } foreach ($cols as $column) { diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/lib/Cake/Model/Datasource/Database/Oracle.php similarity index 99% rename from cake/libs/model/datasources/dbo/dbo_oracle.php rename to lib/Cake/Model/Datasource/Database/Oracle.php index 4b4444211..76dfe1e1c 100644 --- a/cake/libs/model/datasources/dbo/dbo_oracle.php +++ b/lib/Cake/Model/Datasource/Database/Oracle.php @@ -571,7 +571,7 @@ class DboOracle extends DboSource { */ function constraint($action, $table) { if (empty($table)) { - trigger_error(__('Must specify table to operate on constraints')); + trigger_error(__d('cake_dev', 'Must specify table to operate on constraints')); } $table = strtoupper($table); @@ -629,7 +629,7 @@ class DboOracle extends DboSource { return $constraints; break; default: - trigger_error(__('DboOracle::constraint() accepts only enable, disable, or list')); + trigger_error(__d('cake_dev', 'DboOracle::constraint() accepts only enable, disable, or list')); } } return true; @@ -976,7 +976,7 @@ class DboOracle extends DboSource { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { if (!isset($resultSet) || !is_array($resultSet)) { if (Configure::read('debug') > 0) { - echo '

' . __('SQL Error in model %s:', $model->alias) . ' '; + echo '
' . __d('cake_dev', 'SQL Error in model %s:', $model->alias) . ' '; if (isset($this->error) && $this->error != null) { echo $this->error; } diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php similarity index 99% rename from cake/libs/model/datasources/dbo/dbo_postgres.php rename to lib/Cake/Model/Datasource/Database/Postgres.php index 2b53aa1e5..b964d73ff 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DboSource', 'Model/Datasource'); + /** * PostgreSQL layer for DBO. * @@ -24,7 +26,7 @@ * * @package cake.libs.model.datasources.dbo */ -class DboPostgres extends DboSource { +class Postgres extends DboSource { /** * Driver description diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php similarity index 98% rename from cake/libs/model/datasources/dbo/dbo_sqlite.php rename to lib/Cake/Model/Datasource/Database/Sqlite.php index 6819adf9a..d4daa3aac 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('DboSource', 'Model/Datasource'); + /** * DBO implementation for the SQLite3 DBMS. * @@ -24,7 +26,7 @@ * * @package cake.libs.model.datasources.dbo */ -class DboSqlite extends DboSource { +class Sqlite extends DboSource { /** * Datasource Description @@ -229,7 +231,7 @@ class DboSqlite extends DboSource { */ function truncate($table) { $this->_execute('DELETE FROM sqlite_sequence where name=' . $this->fullTableName($table)); - return $this->execute('DELETE FROM ' . $this->fullTableName($table)); + return $this->execute('DELETE FROM ' . $this->fullTableName($table)); } /** @@ -385,12 +387,12 @@ class DboSqlite extends DboSource { extract($column); if (empty($name) || empty($type)) { - trigger_error('Column name or type not defined in schema', E_USER_WARNING); + trigger_error(__d('cake_dev', 'Column name or type not defined in schema'), E_USER_WARNING); return null; } if (!isset($this->columns[$type])) { - trigger_error(__('Column type %s does not exist', $type), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Column type %s does not exist', $type), E_USER_WARNING); return null; } @@ -471,7 +473,7 @@ class DboSqlite extends DboSource { $table = $this->fullTableName($model); if ($table) { $indexes = $this->query('PRAGMA index_list(' . $table . ')'); - + if (is_bool($indexes)) { return array(); } @@ -552,4 +554,4 @@ class DboSqlite extends DboSource { } return $out; } -} +} \ No newline at end of file diff --git a/cake/libs/model/datasources/dbo_source.php b/lib/Cake/Model/Datasource/DboSource.php old mode 100755 new mode 100644 similarity index 99% rename from cake/libs/model/datasources/dbo_source.php rename to lib/Cake/Model/Datasource/DboSource.php index 1f85d0ac1..e46d77fff --- a/cake/libs/model/datasources/dbo_source.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -16,7 +16,10 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'String'); + +App::uses('DataSource', 'Model/Datasource'); +App::uses('String', 'Utility'); +App::uses('View', 'View'); /** * DboSource @@ -889,7 +892,6 @@ class DboSource extends DataSource { return; } if (PHP_SAPI != 'cli') { - App::import('Core', 'View'); $controller = null; $View = new View($controller, false); $View->set('logs', array($this->configKeyName => $log)); @@ -939,11 +941,11 @@ class DboSource extends DataSource { if (Configure::read('debug') > 0) { $out = null; if ($error) { - trigger_error('' . __('SQL Error:') . " {$this->error}", E_USER_WARNING); + trigger_error('' . __d('cake_dev', 'SQL Error:') . " {$this->error}", E_USER_WARNING); } else { - $out = ('[' . __('Aff:%s Num:%s Took:%sms', $this->affected, $this->numRows, $this->took) . ']'); + $out = ('[' . __d('cake_dev', 'Aff:%s Num:%s Took:%sms', $this->affected, $this->numRows, $this->took) . ']'); } - pr(sprintf('

' . __('Query:') . ' %s %s

', $sql, $out)); + pr(sprintf('

' . __d('cake_dev', 'Query:') . ' %s %s

', $sql, $out)); } } @@ -1167,7 +1169,7 @@ class DboSource extends DataSource { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { if (!is_array($resultSet)) { if (Configure::read('debug') > 0) { - echo '
' . __('SQL Error in model %s:', $model->alias) . ' '; + echo '
' . __d('cake_dev', 'SQL Error in model %s:', $model->alias) . ' '; if (isset($this->error) && $this->error != null) { echo $this->error; } @@ -2723,7 +2725,7 @@ class DboSource extends DataSource { */ public function length($real) { if (!preg_match_all('/([\w\s]+)(?:\((\d+)(?:,(\d+))?\))?(\sunsigned)?(\szerofill)?/', $real, $result)) { - trigger_error(__("FIXME: Can't parse field: " . $real), E_USER_WARNING); + trigger_error(__d('cake_dev', "FIXME: Can't parse field: " . $real), E_USER_WARNING); $col = str_replace(array(')', 'unsigned'), '', $real); $limit = null; @@ -2831,7 +2833,7 @@ class DboSource extends DataSource { */ public function createSchema($schema, $tableName = null) { if (!is_a($schema, 'CakeSchema')) { - trigger_error(__('Invalid schema object'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Invalid schema object'), E_USER_WARNING); return null; } $out = ''; @@ -2913,12 +2915,12 @@ class DboSource extends DataSource { extract(array_merge(array('null' => true), $column)); if (empty($name) || empty($type)) { - trigger_error(__('Column name or type not defined in schema'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Column name or type not defined in schema'), E_USER_WARNING); return null; } if (!isset($this->columns[$type])) { - trigger_error(__('Column type %s does not exist', $type), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Column type %s does not exist', $type), E_USER_WARNING); return null; } @@ -3144,4 +3146,4 @@ class DboSource extends DataSource { return false; } -} +} \ No newline at end of file diff --git a/cake/libs/session/cache_session.php b/lib/Cake/Model/Datasource/Session/CacheSession.php similarity index 100% rename from cake/libs/session/cache_session.php rename to lib/Cake/Model/Datasource/Session/CacheSession.php diff --git a/cake/libs/session/database_session.php b/lib/Cake/Model/Datasource/Session/DatabaseSession.php similarity index 100% rename from cake/libs/session/database_session.php rename to lib/Cake/Model/Datasource/Session/DatabaseSession.php diff --git a/cake/libs/model/model.php b/lib/Cake/Model/Model.php similarity index 99% rename from cake/libs/model/model.php rename to lib/Cake/Model/Model.php index 07863f79b..c1a1c5ae3 100644 --- a/cake/libs/model/model.php +++ b/lib/Cake/Model/Model.php @@ -22,12 +22,13 @@ /** * Included libs */ -App::import('Core', 'ClassRegistry', false); -App::import('Core', 'Validation', false); -App::import('Core', 'String', false); -App::import('Model', 'BehaviorCollection', false); -App::import('Model', 'ModelBehavior', false); -App::import('Model', 'ConnectionManager', false); +App::uses('ClassRegistry', 'Utility'); +App::uses('Validation', 'Utility'); +App::uses('String', 'Utility'); +App::uses('BehaviorCollection', 'Model'); +App::uses('ModelBehavior', 'Model'); +App::uses('ConnectionManager', 'Model'); +App::uses('Xml', 'Utility'); /** * Object-relational mapper. @@ -834,7 +835,6 @@ class Model extends Object { } if (is_object($one)) { if ($one instanceof SimpleXMLElement || $one instanceof DOMNode) { - App::import('Core', 'Xml'); $one = $this->_normalizeXmlData(Xml::toArray($one)); } else { $one = Set::reverse($one); @@ -1005,7 +1005,7 @@ class Model extends Object { public function getColumnTypes() { $columns = $this->schema(); if (empty($columns)) { - trigger_error(__('(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING); + trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING); } $cols = array(); foreach ($columns as $field => $values) { @@ -2602,7 +2602,7 @@ class Model extends Object { if (isset($validator['message'])) { $message = $validator['message']; } else { - $message = __('This field cannot be left blank'); + $message = __d('cake_dev', 'This field cannot be left blank'); } if ( @@ -2650,7 +2650,7 @@ class Model extends Object { } elseif (!is_array($validator['rule'])) { $valid = preg_match($rule, $data[$fieldName]); } elseif (Configure::read('debug') > 0) { - trigger_error(__('Could not find validation handler %s for %s', $rule, $fieldName), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Could not find validation handler %s for %s', $rule, $fieldName), E_USER_WARNING); } if (!$valid || (is_string($valid) && strlen($valid) > 0)) { @@ -2957,7 +2957,7 @@ class Model extends Object { return array($with, array_unique(array_merge($assoc[$with], $keys))); } trigger_error( - __('Invalid join model settings in %s', $model->alias), + __d('cake_dev', 'Invalid join model settings in %s', $model->alias), E_USER_WARNING ); } diff --git a/cake/libs/model/model_behavior.php b/lib/Cake/Model/ModelBehavior.php similarity index 100% rename from cake/libs/model/model_behavior.php rename to lib/Cake/Model/ModelBehavior.php diff --git a/lib/Cake/Model/Permission.php b/lib/Cake/Model/Permission.php new file mode 100644 index 000000000..5ca0f0682 --- /dev/null +++ b/lib/Cake/Model/Permission.php @@ -0,0 +1,84 @@ +useDbConfig = $config; + } + parent::__construct(); + } +} \ No newline at end of file diff --git a/cake/libs/cake_request.php b/lib/Cake/Network/CakeRequest.php similarity index 99% rename from cake/libs/cake_request.php rename to lib/Cake/Network/CakeRequest.php index 90435ed8b..12dde4de8 100644 --- a/cake/libs/cake_request.php +++ b/lib/Cake/Network/CakeRequest.php @@ -16,6 +16,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('Set', 'Utility'); + /** * A class that helps wrap Request information and particulars about a single request. * Provides methods commonly used to introspect on the request headers and request body. @@ -223,13 +225,14 @@ class CakeRequest implements ArrayAccess { $config = Configure::read('App'); extract($config); - if (!$base) { + if (empty($base)) { $base = $this->base; } if ($base !== false) { $this->webroot = $base . '/'; return $this->base = $base; } + if (!$baseUrl) { $base = dirname(env('SCRIPT_NAME')); @@ -377,7 +380,7 @@ class CakeRequest implements ArrayAccess { $type = strtolower(substr($name, 2)); return $this->is($type); } - throw new CakeException(__('Method %s does not exist', $name)); + throw new CakeException(__d('cake_dev', 'Method %s does not exist', $name)); } /** diff --git a/cake/libs/cake_response.php b/lib/Cake/Network/CakeResponse.php similarity index 99% rename from cake/libs/cake_response.php rename to lib/Cake/Network/CakeResponse.php index 9c200cbcb..e1abb8a3d 100644 --- a/cake/libs/cake_response.php +++ b/lib/Cake/Network/CakeResponse.php @@ -459,7 +459,7 @@ class CakeResponse { return $this->_status; } if (!isset($this->_statusCodes[$code])) { - throw new CakeException(__('Unknown status code')); + throw new CakeException(__d('cake_dev', 'Unknown status code')); } return $this->_status = $code; } diff --git a/cake/libs/cake_socket.php b/lib/Cake/Network/CakeSocket.php similarity index 98% rename from cake/libs/cake_socket.php rename to lib/Cake/Network/CakeSocket.php index 2a07a387a..4d6c2c720 100644 --- a/cake/libs/cake_socket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Validation'); +App::uses('Validation', 'Utility'); /** * Cake network socket connection class. @@ -221,7 +221,7 @@ class CakeSocket { $buffer = fread($this->connection, $length); $info = stream_get_meta_data($this->connection); if ($info['timed_out']) { - $this->setLastError(E_WARNING, __('Connection timed out')); + $this->setLastError(E_WARNING, __d('cake_dev', 'Connection timed out')); return false; } return $buffer; diff --git a/cake/libs/http/basic_authentication.php b/lib/Cake/Network/Http/BasicAuthentication.php similarity index 100% rename from cake/libs/http/basic_authentication.php rename to lib/Cake/Network/Http/BasicAuthentication.php diff --git a/cake/libs/http/digest_authentication.php b/lib/Cake/Network/Http/DigestAuthentication.php similarity index 100% rename from cake/libs/http/digest_authentication.php rename to lib/Cake/Network/Http/DigestAuthentication.php diff --git a/cake/libs/http_response.php b/lib/Cake/Network/Http/HttpResponse.php similarity index 97% rename from cake/libs/http_response.php rename to lib/Cake/Network/Http/HttpResponse.php index 51aff7a78..04322547f 100644 --- a/cake/libs/http_response.php +++ b/lib/Cake/Network/Http/HttpResponse.php @@ -126,11 +126,11 @@ class HttpResponse implements ArrayAccess { */ public function parseResponse($message) { if (!is_string($message)) { - throw new SocketException(__('Invalid response.')); + throw new SocketException(__d('cake_dev', 'Invalid response.')); } if (!preg_match("/^(.+\r\n)(.*)(?<=\r\n)\r\n/Us", $message, $match)) { - throw new SocketException(__('Invalid HTTP response.')); + throw new SocketException(__d('cake_dev', 'Invalid HTTP response.')); } list(, $statusLine, $header) = $match; @@ -198,7 +198,7 @@ class HttpResponse implements ArrayAccess { while ($chunkLength !== 0) { if (!preg_match("/^([0-9a-f]+) *(?:;(.+)=(.+))?\r\n/iU", $body, $match)) { - throw new SocketException(__('HttpSocket::_decodeChunkedBody - Could not parse malformed chunk.')); + throw new SocketException(__d('cake_dev', 'HttpSocket::_decodeChunkedBody - Could not parse malformed chunk.')); } $chunkSize = 0; diff --git a/cake/libs/http_socket.php b/lib/Cake/Network/Http/HttpSocket.php similarity index 94% rename from cake/libs/http_socket.php rename to lib/Cake/Network/Http/HttpSocket.php index 9e820f921..926d70ee6 100644 --- a/cake/libs/http_socket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -16,8 +16,8 @@ * @since CakePHP(tm) v 1.2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'CakeSocket'); -App::import('Core', 'Router'); +App::uses('CakeSocket', 'Network'); +App::uses('Router', 'Routing'); /** * Cake network socket connection class. @@ -211,7 +211,7 @@ class HttpSocket extends CakeSocket { return; } if (!is_resource($resource)) { - throw new SocketException(__('Invalid resource.')); + throw new SocketException(__d('cake_dev', 'Invalid resource.')); } $this->_contentResource = $resource; } @@ -363,8 +363,10 @@ class HttpSocket extends CakeSocket { $this->disconnect(); } - if (!App::import('Lib', $this->responseClass)) { - throw new SocketException(__('Class %s not found.', $this->responseClass)); + list($plugin, $responseClass) = pluginSplit($this->responseClass, true); + App::uses($this->responseClass, $plugin . 'Network/Http'); + if (!class_exists($responseClass)) { + throw new SocketException(__d('cake_dev', 'Class %s not found.', $this->responseClass)); } $responseClass = $this->responseClass; $this->response = new $responseClass($response); @@ -530,12 +532,15 @@ class HttpSocket extends CakeSocket { return; } $method = key($this->_auth); - $authClass = Inflector::camelize($method) . 'Authentication'; - if (!App::import('Lib', 'http/' . $authClass)) { - throw new SocketException(__('Unknown authentication method.')); + list($plugin, $authClass) = pluginSplit($method, true); + $authClass = Inflector::camelize($authClass) . 'Authentication'; + App::uses($authClass, $plugin . 'Network/Http'); + + if (!class_exists($authClass)) { + throw new SocketException(__d('cake_dev', 'Unknown authentication method.')); } if (!method_exists($authClass, 'authentication')) { - throw new SocketException(sprintf(__('The %s do not support authentication.'), $authClass)); + throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support authentication.'), $authClass)); } call_user_func_array("$authClass::authentication", array($this, &$this->_auth[$method])); } @@ -556,12 +561,15 @@ class HttpSocket extends CakeSocket { if (empty($this->_proxy['method']) || !isset($this->_proxy['user'], $this->_proxy['pass'])) { return; } - $authClass = Inflector::camelize($this->_proxy['method']) . 'Authentication'; - if (!App::import('Lib', 'http/' . $authClass)) { - throw new SocketException(__('Unknown authentication method for proxy.')); + list($plugin, $authClass) = pluginSplit($this->_proxy['method'], true); + $authClass = Inflector::camelize($authClass) . 'Authentication'; + App::uses($authClass, $plugin. 'Network/Http'); + + if (!class_exists($authClass)) { + throw new SocketException(__d('cake_dev', 'Unknown authentication method for proxy.')); } if (!method_exists($authClass, 'proxyAuthentication')) { - throw new SocketException(sprintf(__('The %s do not support proxy authentication.'), $authClass)); + throw new SocketException(sprintf(__d('cake_dev', 'The %s do not support proxy authentication.'), $authClass)); } call_user_func_array("$authClass::proxyAuthentication", array($this, &$this->_proxy)); } @@ -779,7 +787,7 @@ class HttpSocket extends CakeSocket { if (is_string($request)) { $isValid = preg_match("/(.+) (.+) (.+)\r\n/U", $request, $match); if (!$this->quirksMode && (!$isValid || ($match[2] == '*' && !in_array($match[3], $asteriskMethods)))) { - throw new SocketException(__('HttpSocket::_buildRequestLine - Passed an invalid request line string. Activate quirks mode to do this.')); + throw new SocketException(__d('cake_dev', 'HttpSocket::_buildRequestLine - Passed an invalid request line string. Activate quirks mode to do this.')); } return $request; } elseif (!is_array($request)) { @@ -797,7 +805,7 @@ class HttpSocket extends CakeSocket { } if (!$this->quirksMode && $request['uri'] === '*' && !in_array($request['method'], $asteriskMethods)) { - throw new SocketException(__('HttpSocket::_buildRequestLine - The "*" asterisk character is only allowed for the following methods: %s. Activate quirks mode to work outside of HTTP/1.1 specs.', implode(',', $asteriskMethods))); + throw new SocketException(__d('cake_dev', 'HttpSocket::_buildRequestLine - The "*" asterisk character is only allowed for the following methods: %s. Activate quirks mode to work outside of HTTP/1.1 specs.', implode(',', $asteriskMethods))); } return $request['method'] . ' ' . $request['uri'] . ' ' . $versionToken . "\r\n"; } diff --git a/cake/libs/dispatcher.php b/lib/Cake/Routing/Dispatcher.php similarity index 95% rename from cake/libs/dispatcher.php rename to lib/Cake/Routing/Dispatcher.php index 9d82935a8..be0ebe77e 100644 --- a/cake/libs/dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -23,10 +23,13 @@ /** * List of helpers to include */ -App::import('Core', 'Router', false); -App::import('Core', 'CakeRequest', false); -App::import('Core', 'CakeResponse', false); -App::import('Controller', 'Controller', false); +App::uses('Router', 'Routing'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeResponse', 'Network'); +App::uses('Controller', 'Controller'); +App::uses('Scaffold', 'Controller'); +App::uses('View', 'View'); +App::uses('Debugger', 'Utility'); /** * Dispatcher converts Requests into controller actions. It uses the dispatched Request @@ -116,6 +119,7 @@ class Dispatcher { $privateAction = in_array($prefix, $prefixes); } } + return $privateAction; } @@ -137,7 +141,6 @@ class Dispatcher { if (!isset($methods[$request->params['action']])) { if ($controller->scaffold !== false) { - App::import('Controller', 'Scaffold', false); return new Scaffold($controller, $request); } throw new MissingActionException(array( @@ -197,10 +200,7 @@ class Dispatcher { if (!$ctrlClass) { return false; } - $ctrlClass .= 'Controller'; - if (class_exists($ctrlClass)) { - return new $ctrlClass($request); - } + return new $ctrlClass($request); } /** @@ -219,8 +219,12 @@ class Dispatcher { $controller = Inflector::camelize($request->params['controller']); } if ($pluginPath . $controller) { - if (App::import('Controller', $pluginPath . $controller)) { - return $controller; + $class = $controller . 'Controller'; + App::uses('AppController', 'Controller'); + App::uses($pluginName . 'AppController', $pluginPath . 'Controller'); + App::uses($class, $pluginPath . 'Controller'); + if (class_exists($class)) { + return $class; } } return false; @@ -254,9 +258,6 @@ class Dispatcher { } if (file_exists($filename)) { - if (!class_exists('View')) { - App::import('View', 'View', false); - } $controller = null; $view = new View($controller); return $view->renderCache($filename, microtime(true)); diff --git a/cake/libs/route/cake_route.php b/lib/Cake/Routing/Route/CakeRoute.php similarity index 100% rename from cake/libs/route/cake_route.php rename to lib/Cake/Routing/Route/CakeRoute.php diff --git a/cake/libs/route/plugin_short_route.php b/lib/Cake/Routing/Route/PluginShortRoute.php similarity index 97% rename from cake/libs/route/plugin_short_route.php rename to lib/Cake/Routing/Route/PluginShortRoute.php index 9509c5d32..a0f2d18a9 100644 --- a/cake/libs/route/plugin_short_route.php +++ b/lib/Cake/Routing/Route/PluginShortRoute.php @@ -1,5 +1,5 @@ $url); @@ -583,7 +583,7 @@ class Router { */ private static function __connectDefaultRoutes() { if ($plugins = App::objects('plugin')) { - App::import('Core', 'route/PluginShortRoute'); + App::uses('PluginShortRoute', 'Routing/Route'); foreach ($plugins as $key => $value) { $plugins[$key] = Inflector::underscore($value); } diff --git a/cake/tests/lib/cake_test_case.php b/lib/Cake/TestSuite/CakeTestCase.php similarity index 97% rename from cake/tests/lib/cake_test_case.php rename to lib/Cake/TestSuite/CakeTestCase.php index 7581bd6a8..b769ebdf0 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -19,19 +19,18 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); -require_once CAKE_TESTS_LIB . 'cake_fixture_manager.php'; -require_once CAKE_TESTS_LIB . 'cake_test_model.php'; -require_once CAKE_TESTS_LIB . 'cake_test_fixture.php'; +App::uses('CakeFixtureManager', 'TestSuite/Fixture'); +App::uses('CakeTestFixture', 'TestSuite/Fixture'); /** * CakeTestCase class * * @package cake.tests.lib */ -class CakeTestCase extends PHPUnit_Framework_TestCase { +abstract class CakeTestCase extends PHPUnit_Framework_TestCase { /** - * The class responsible for managinf the creation, loading and removing of fixtures + * The class responsible for managing the creation, loading and removing of fixtures * * @var CakeFixtureManager * @access public @@ -185,7 +184,7 @@ class CakeTestCase extends PHPUnit_Framework_TestCase { */ function loadFixtures() { if (empty($this->fixtureManager)) { - throw new Exception(__('No fixture manager to load the test fixture')); + throw new Exception(__d('cake_dev', 'No fixture manager to load the test fixture')); } $args = func_get_args(); foreach ($args as $class) { diff --git a/cake/tests/lib/cake_test_loader.php b/lib/Cake/TestSuite/CakeTestLoader.php similarity index 92% rename from cake/tests/lib/cake_test_loader.php rename to lib/Cake/TestSuite/CakeTestLoader.php index 94ed036f9..e00b716f4 100644 --- a/cake/tests/lib/cake_test_loader.php +++ b/lib/Cake/TestSuite/CakeTestLoader.php @@ -38,7 +38,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { */ protected function _resolveTestFile($filePath, $params) { $basePath = $this->_basePath($params) . DS . $filePath; - $ending = '.test.php'; + $ending = 'Test.php'; return (strpos($basePath, $ending) === (strlen($basePath) - strlen($ending))) ? $basePath : $basePath . $ending; } @@ -56,7 +56,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { $result = APP_TEST_CASES; } else if (!empty($params['plugin'])) { $pluginPath = App::pluginPath($params['plugin']); - $result = $pluginPath . 'tests' . DS . 'cases'; + $result = $pluginPath . 'tests' . DS . 'Case'; } return $result; } @@ -72,7 +72,9 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { $testCases = array(); foreach ($fileList as $testCaseFile) { - $testCases[$testCaseFile] = str_replace($directory . DS, '', $testCaseFile); + $case = str_replace($directory . DS, '', $testCaseFile); + $case = str_replace('Test.php', '', $case); + $testCases[$testCaseFile] = $case; } return $testCases; } @@ -92,7 +94,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { $files = new RegexIterator( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)), - '/.*\.test.php$/' + '/.*Test.php$/' ); foreach ($files as $file) { diff --git a/cake/tests/lib/cake_test_runner.php b/lib/Cake/TestSuite/CakeTestRunner.php similarity index 88% rename from cake/tests/lib/cake_test_runner.php rename to lib/Cake/TestSuite/CakeTestRunner.php index f1d2c9eda..0de3880ce 100644 --- a/cake/tests/lib/cake_test_runner.php +++ b/lib/Cake/TestSuite/CakeTestRunner.php @@ -80,12 +80,14 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner { */ protected function _getFixtureManager($arguments) { if (isset($arguments['fixtureManager'])) { - if (App::import('Lib', 'test_suite/' . Inflector::underscore($arguments['fixtureManager']))) { + App::uses($arguments['fixtureManager'], 'TestSuite'); + if (class_exists($arguments['fixtureManager'])) { return new $arguments['fixtureManager']; } - throw new RuntimeException(__('Could not find fixture manager %s.', $arguments['fixtureManager'])); + throw new RuntimeException(__d('cake_dev', 'Could not find fixture manager %s.', $arguments['fixtureManager'])); } - if (App::import('Lib', 'test_suite/AppFixtureManager')) { + App::uses('AppFixtureManager', 'TestSuite'); + if (class_exists('AppFixtureManager')) { return new AppFixtureManager(); } return new CakeFixtureManager(); diff --git a/cake/tests/lib/cake_test_suite.php b/lib/Cake/TestSuite/CakeTestSuite.php similarity index 100% rename from cake/tests/lib/cake_test_suite.php rename to lib/Cake/TestSuite/CakeTestSuite.php diff --git a/cake/tests/lib/cake_test_suite_command.php b/lib/Cake/TestSuite/CakeTestSuiteCommand.php similarity index 86% rename from cake/tests/lib/cake_test_suite_command.php rename to lib/Cake/TestSuite/CakeTestSuiteCommand.php index 2ed6eab0f..29dfd8f1d 100644 --- a/cake/tests/lib/cake_test_suite_command.php +++ b/lib/Cake/TestSuite/CakeTestSuiteCommand.php @@ -16,17 +16,15 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -define('CORE_TEST_CASES', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'cases'); -define('APP_TEST_CASES', TESTS . 'cases'); require 'PHPUnit/TextUI/Command.php'; -require_once CAKE_TESTS_LIB . 'cake_test_runner.php'; -require_once CAKE_TESTS_LIB . 'cake_test_loader.php'; -require_once CAKE_TESTS_LIB . 'cake_test_suite.php'; -require_once CAKE_TESTS_LIB . 'cake_test_case.php'; -require_once CAKE_TESTS_LIB . 'controller_test_case.php'; - +App::uses('CakeTestRunner', 'TestSuite'); +App::uses('CakeTestLoader', 'TestSuite'); +App::uses('CakeTestSuite', 'TestSuite'); +App::uses('CakeTestCase', 'TestSuite'); +App::uses('ControllerTestCase', 'TestSuite'); +App::uses('CakeTestModel', 'TestSuite/Fixture'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); @@ -43,6 +41,9 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { * @param array $params list of options to be used for this run */ public function __construct($loader, $params = array()) { + if ($loader && !class_exists($loader)) { + throw new MissingTestLoaderException(array('class' => $loader)); + } $this->arguments['loader'] = $loader; $this->arguments['test'] = $params['case']; $this->arguments['testFile'] = $params; @@ -161,13 +162,14 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { $type = strtolower($reporter); $coreClass = 'Cake' . ucwords($reporter) . 'Reporter'; - $coreFile = CAKE_TESTS_LIB . 'reporter/cake_' . $type . '_reporter.php'; + App::uses($coreClass, 'TestSuite/Reporter'); $appClass = $reporter . 'Reporter'; - $appFile = APPLIBS . 'test_suite/reporter/' . $type . '_reporter.php'; - if (include_once $coreFile) { + App::uses($appClass, 'TestSuite/Reporter'); + + if (!class_exists($appClass)) { $object = new $coreClass(null, $this->_params); - } elseif (include_once $appFile) { + } else { $object = new $appClass(null, $this->_params); } return $this->arguments['printer'] = $object; diff --git a/cake/tests/lib/cake_test_suite_dispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php similarity index 97% rename from cake/tests/lib/cake_test_suite_dispatcher.php rename to lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index caae159cc..2fef24987 100644 --- a/cake/tests/lib/cake_test_suite_dispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -17,6 +17,11 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +define('CORE_TEST_CASES', LIBS . 'tests' . DS . 'Case'); +define('APP_TEST_CASES', TESTS . 'Case'); + +App::uses('CakeTestSuiteCommand', 'TestSuite'); + /** * CakeTestSuiteDispatcher handles web requests to the test suite and runs the correct action. * @@ -88,8 +93,6 @@ class CakeTestSuiteDispatcher { $this->_checkPHPUnit(); $this->_parseParams(); - require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_suite_command.php'; - if ($this->params['case']) { $value = $this->_runTestCase(); } else { diff --git a/cake/tests/lib/controller_test_case.php b/lib/Cake/TestSuite/ControllerTestCase.php similarity index 91% rename from cake/tests/lib/controller_test_case.php rename to lib/Cake/TestSuite/ControllerTestCase.php index 76d34f310..09ba4af67 100644 --- a/cake/tests/lib/controller_test_case.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -19,9 +19,12 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); -require_once CAKE . 'libs' . DS . 'dispatcher.php'; -require_once CAKE_TESTS_LIB . 'cake_test_case.php'; -App::import('Core', array('Router', 'CakeRequest', 'CakeResponse', 'Helper')); +App::uses('Dispatcher', 'Routing'); +App::uses('CakeTestCase', 'TestSuite'); +App::uses('Router', 'Routing'); +App::uses('CakeRequest', 'Network'); +App::uses('CakeResponse', 'Network'); +App::uses('Helper', 'View'); /** * ControllerTestDispatcher class @@ -252,7 +255,13 @@ class ControllerTestCase extends CakeTestCase { * @return Controller Mocked controller */ public function generate($controller, $mocks = array()) { - if (!class_exists($controller.'Controller') && App::import('Controller', $controller) === false) { + list($plugin, $controller) = pluginSplit($controller); + if ($plugin) { + App::uses($plugin . 'AppController', $plugin . '.Controller'); + $plugin .= '.'; + } + App::uses($controller . 'Controller', $plugin . 'Controller'); + if (!class_exists($controller.'Controller')) { throw new MissingControllerException(array('controller' => $controller.'Controller')); } ClassRegistry::flush(); @@ -293,10 +302,11 @@ class ControllerTestCase extends CakeTestCase { if ($methods === true) { $methods = array(); } - list($plugin, $name) = pluginSplit($component); - if (!App::import('Component', $component)) { + list($plugin, $name) = pluginSplit($component, true); + App::uses($name . 'Component', $plugin . 'Controller/Component'); + if (!class_exists($name . 'Component')) { throw new MissingComponentFileException(array( - 'file' => Inflector::underscore($name) . '.php', + 'file' => $name . 'Component.php', 'class' => $name.'Component' )); } diff --git a/cake/tests/lib/coverage/base_coverage_report.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php similarity index 99% rename from cake/tests/lib/coverage/base_coverage_report.php rename to lib/Cake/TestSuite/Coverage/BaseCoverageReport.php index 7960a6e75..3a04a946c 100644 --- a/cake/tests/lib/coverage/base_coverage_report.php +++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php @@ -101,7 +101,7 @@ abstract class BaseCoverageReport { } elseif ($this->pluginTest) { $path = App::pluginPath($this->pluginTest); } else { - $path = TEST_CAKE_CORE_INCLUDE_PATH; + $path = LIBS; } return $path; } diff --git a/cake/tests/lib/coverage/html_coverage_report.php b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php similarity index 98% rename from cake/tests/lib/coverage/html_coverage_report.php rename to lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php index bdd18e972..e57e9e3de 100644 --- a/cake/tests/lib/coverage/html_coverage_report.php +++ b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php @@ -16,10 +16,11 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once dirname(__FILE__) . '/base_coverage_report.php'; PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('BaseCoverageReport', 'TestSuite/Coverage'); + class HtmlCoverageReport extends BaseCoverageReport { /** diff --git a/cake/tests/lib/coverage/text_coverage_report.php b/lib/Cake/TestSuite/Coverage/TextCoverageReport.php similarity index 100% rename from cake/tests/lib/coverage/text_coverage_report.php rename to lib/Cake/TestSuite/Coverage/TextCoverageReport.php diff --git a/cake/tests/lib/cake_fixture_manager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php similarity index 78% rename from cake/tests/lib/cake_fixture_manager.php rename to lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 2615847ca..51c0392d9 100644 --- a/cake/tests/lib/cake_fixture_manager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -18,6 +18,9 @@ */ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('ConnectionManager', 'Model'); +App::uses('ClassRegistry', 'Utility'); + class CakeFixtureManager { /** @@ -54,7 +57,7 @@ class CakeFixtureManager { * @param CakeTestCase $test the test case to inspect * @return void */ - public function fixturize(CakeTestCase $test) { + public function fixturize($test) { if (empty($test->fixtures) || !empty($this->_processed[get_class($test)])) { $test->db = $this->_db; return; @@ -80,22 +83,7 @@ class CakeFixtureManager { if ($this->_initialized) { return; } - $testDbAvailable = in_array('test', array_keys(ConnectionManager::enumConnectionObjects())); - - $_prefix = null; - - if ($testDbAvailable) { - // Try for test DB - @$db = ConnectionManager::getDataSource('test'); - $testDbAvailable = $db->isConnected(); - } else { - throw new MissingConnectionException(__('You need to create a $test datasource connection to start using fixtures')); - } - - if (!$testDbAvailable) { - throw new MissingConnectionException(__('Unable to connect to the $test datasource')); - } - + $db = ConnectionManager::getDataSource('test'); $this->_db = $db; ClassRegistry::config(array('ds' => 'test')); $this->_initialized = true; @@ -114,47 +102,41 @@ class CakeFixtureManager { if (isset($this->_loaded[$fixture])) { continue; } + if (strpos($fixture, 'core.') === 0) { $fixture = substr($fixture, strlen('core.')); - foreach (App::core('cake') as $key => $path) { - $fixturePaths[] = $path . 'tests' . DS . 'fixtures'; - } + $fixturePaths[] = LIBS . 'tests' . DS . 'Fixture'; } elseif (strpos($fixture, 'app.') === 0) { $fixture = substr($fixture, strlen('app.')); $fixturePaths = array( - TESTS . 'fixtures', - VENDORS . 'tests' . DS . 'fixtures' + TESTS . 'Fixture' ); } elseif (strpos($fixture, 'plugin.') === 0) { $parts = explode('.', $fixture, 3); $pluginName = $parts[1]; $fixture = $parts[2]; $fixturePaths = array( - App::pluginPath($pluginName) . 'tests' . DS . 'fixtures', - TESTS . 'fixtures', - VENDORS . 'tests' . DS . 'fixtures' + App::pluginPath($pluginName) . 'tests' . DS . 'Fixture', + TESTS . 'Fixture' ); } else { $fixturePaths = array( - TESTS . 'fixtures', - VENDORS . 'tests' . DS . 'fixtures', - TEST_CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'tests' . DS . 'fixtures' + TESTS . 'Fixture', + LIBS . 'tests' . DS . 'Fixture' ); } foreach ($fixturePaths as $path) { - if (is_readable($path . DS . $fixture . '_fixture.php')) { - $fixtureFile = $path . DS . $fixture . '_fixture.php'; + $className = Inflector::camelize($fixture); + if (is_readable($path . DS . $className . 'Fixture.php')) { + $fixtureFile = $path . DS . $className . 'Fixture.php'; + require_once($fixtureFile); + $fixtureClass = $className . 'Fixture'; + $this->_loaded[$fixtureIndex] = new $fixtureClass($this->_db); + $this->_fixtureMap[$fixtureClass] = $this->_loaded[$fixtureIndex]; break; } } - - if (isset($fixtureFile)) { - require_once($fixtureFile); - $fixtureClass = Inflector::camelize($fixture) . 'Fixture'; - $this->_loaded[$fixtureIndex] = new $fixtureClass($this->_db); - $this->_fixtureMap[$fixtureClass] = $this->_loaded[$fixtureIndex]; - } } } @@ -252,7 +234,7 @@ class CakeFixtureManager { $fixture->truncate($db); $fixture->insert($db); } else { - throw new UnexpectedValueException(__('Referenced fixture class %s not found', $name)); + throw new UnexpectedValueException(__d('cake_dev', 'Referenced fixture class %s not found', $name)); } } diff --git a/cake/tests/lib/cake_test_fixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php similarity index 95% rename from cake/tests/lib/cake_test_fixture.php rename to lib/Cake/TestSuite/Fixture/CakeTestFixture.php index 5e78671eb..a83854266 100644 --- a/cake/tests/lib/cake_test_fixture.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php @@ -19,6 +19,8 @@ PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); +App::uses('CakeSchema', 'Model'); + /** * Short description for class. * @@ -57,7 +59,6 @@ class CakeTestFixture { $this->name = get_class($this); } } - App::import('Model', 'CakeSchema'); $this->Schema = new CakeSchema(array('name' => 'TestSuite', 'connection' => 'test')); $this->init(); } @@ -73,9 +74,12 @@ class CakeTestFixture { is_array($this->import) ? $this->import : array('model' => $this->import) ); - if (isset($import['model']) && App::import('Model', $import['model'])) { - App::import('Model', $import['model']); - list(, $modelClass) = pluginSplit($import['model']); + if (isset($import['model'])) { + list($plugin, $modelClass) = pluginSplit($import['model'], true); + App::uses($modelClass, $plugin . 'Model'); + if (!class_exists($modelClass)) { + throw new MissingModelException(array('class' => $modelClass)); + } $model = new $modelClass(null, null, $import['connection']); $db = $model->getDataSource(); if (empty($model->tablePrefix)) { diff --git a/cake/tests/lib/cake_test_model.php b/lib/Cake/TestSuite/Fixture/CakeTestModel.php similarity index 95% rename from cake/tests/lib/cake_test_model.php rename to lib/Cake/TestSuite/Fixture/CakeTestModel.php index a896a50d9..39632a45b 100644 --- a/cake/tests/lib/cake_test_model.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestModel.php @@ -16,7 +16,8 @@ * @since CakePHP(tm) v 1.2.0.4667 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once LIBS.'model'.DS.'model.php'; + +App::uses('Model', 'Model'); /** * Short description for class. diff --git a/cake/tests/lib/reporter/cake_base_reporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php similarity index 98% rename from cake/tests/lib/reporter/cake_base_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeBaseReporter.php index 8e48065c2..aba62fde5 100644 --- a/cake/tests/lib/reporter/cake_base_reporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php @@ -187,7 +187,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { if (!$this->_headerSent) { echo $this->paintHeader(); } - echo __('Running %s', $suite->getName()) . "\n"; + echo __d('cake_dev', 'Running %s', $suite->getName()) . "\n"; } /** @@ -217,4 +217,4 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { $this->paintPass($test, $time); } -} +} \ No newline at end of file diff --git a/cake/tests/lib/reporter/cake_html_reporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php old mode 100755 new mode 100644 similarity index 94% rename from cake/tests/lib/reporter/cake_html_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index 6af5c6029..428b11d85 --- a/cake/tests/lib/reporter/cake_html_reporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 1.2.0.4433 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -include_once dirname(__FILE__) . DS . 'cake_base_reporter.php'; +App::uses('CakeBaseReporter', 'TestSuite/Reporter'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT'); @@ -157,8 +157,7 @@ class CakeHtmlReporter extends CakeBaseReporter { * @return void */ public function paintCoverage(array $coverage) { - $file = dirname(dirname(__FILE__)) . '/coverage/html_coverage_report.php'; - include_once $file; + App::uses('HtmlCoverageReport', 'TestSuite/Coverage'); $reporter = new HtmlCoverageReport($coverage, $this); echo $reporter->report(); } @@ -235,8 +234,8 @@ class CakeHtmlReporter extends CakeBaseReporter { echo "
  • \n"; echo "Failed"; echo "
    " . $this->_htmlEntities($message->toString()) . "
    \n"; - echo "
    " . __('Test case: %s', $testName) . "
    \n"; - echo "
    " . __('Stack trace:') . '
    ' . $trace . "
    \n"; + echo "
    " . __d('cake_dev', 'Test case: %s', $testName) . "
    \n"; + echo "
    " . __d('cake_dev', 'Stack trace:') . '
    ' . $trace . "
    \n"; echo "
  • \n"; } @@ -273,8 +272,8 @@ class CakeHtmlReporter extends CakeBaseReporter { echo "" . get_class($message) . ""; echo "
    " . $this->_htmlEntities($message->getMessage()) . "
    \n"; - echo "
    " . __('Test case: %s', $testName) . "
    \n"; - echo "
    " . __('Stack trace:') . '
    ' . $trace . "
    \n"; + echo "
    " . __d('cake_dev', 'Test case: %s', $testName) . "
    \n"; + echo "
    " . __d('cake_dev', 'Stack trace:') . '
    ' . $trace . "
    \n"; echo "\n"; } @@ -342,6 +341,6 @@ class CakeHtmlReporter extends CakeBaseReporter { if (!$this->_headerSent) { echo $this->paintHeader(); } - echo '

    ' . __('Running %s', $suite->getName()) . '

    '; + echo '

    ' . __d('cake_dev', 'Running %s', $suite->getName()) . '

    '; } -} +} \ No newline at end of file diff --git a/cake/tests/lib/reporter/cake_text_reporter.php b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php similarity index 100% rename from cake/tests/lib/reporter/cake_text_reporter.php rename to lib/Cake/TestSuite/Reporter/CakeTextReporter.php diff --git a/cake/tests/lib/templates/footer.php b/lib/Cake/TestSuite/templates/footer.php similarity index 96% rename from cake/tests/lib/templates/footer.php rename to lib/Cake/TestSuite/templates/footer.php index 0f6ab6a69..059077000 100644 --- a/cake/tests/lib/templates/footer.php +++ b/lib/Cake/TestSuite/templates/footer.php @@ -26,7 +26,7 @@

    element('sql_dump'); diff --git a/cake/tests/lib/templates/header.php b/lib/Cake/TestSuite/templates/header.php similarity index 100% rename from cake/tests/lib/templates/header.php rename to lib/Cake/TestSuite/templates/header.php diff --git a/cake/tests/lib/templates/menu.php b/lib/Cake/TestSuite/templates/menu.php similarity index 100% rename from cake/tests/lib/templates/menu.php rename to lib/Cake/TestSuite/templates/menu.php diff --git a/cake/tests/lib/templates/missing_connection.php b/lib/Cake/TestSuite/templates/missing_conenction.php similarity index 100% rename from cake/tests/lib/templates/missing_connection.php rename to lib/Cake/TestSuite/templates/missing_conenction.php diff --git a/cake/tests/lib/templates/phpunit.php b/lib/Cake/TestSuite/templates/phpunit.php similarity index 100% rename from cake/tests/lib/templates/phpunit.php rename to lib/Cake/TestSuite/templates/phpunit.php diff --git a/cake/tests/lib/templates/xdebug.php b/lib/Cake/TestSuite/templates/xdebug.php similarity index 100% rename from cake/tests/lib/templates/xdebug.php rename to lib/Cake/TestSuite/templates/xdebug.php diff --git a/cake/libs/class_registry.php b/lib/Cake/Utility/ClassRegistry.php similarity index 94% rename from cake/libs/class_registry.php rename to lib/Cake/Utility/ClassRegistry.php index 37b67b44f..f4181f02b 100644 --- a/cake/libs/class_registry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -132,7 +132,11 @@ class ClassRegistry { return $model; } - if (class_exists($class) || App::import($type, $pluginPath . $class)) { + App::uses('Model', 'Model'); + App::uses('AppModel', 'Model'); + App::uses($plugin . 'AppModel', $pluginPath . $type); + App::uses($class, $pluginPath . $type); + if (class_exists($class)) { ${$class} = new $class($settings); } elseif ($type === 'Model') { if ($plugin && class_exists($plugin . 'AppModel')) { @@ -145,7 +149,7 @@ class ClassRegistry { } if (!isset(${$class})) { - trigger_error(__('(ClassRegistry::init() could not create instance of %1$s class %2$s ', $class, $type), E_USER_WARNING); + trigger_error(__d('cake_dev', '(ClassRegistry::init() could not create instance of %1$s class %2$s ', $class, $type), E_USER_WARNING); return $false; } @@ -155,7 +159,7 @@ class ClassRegistry { $_this->map($alias, $class); } } elseif (is_numeric($settings)) { - trigger_error(__('(ClassRegistry::init() Attempted to create instance of a class with a numeric name'), E_USER_WARNING); + trigger_error(__d('cake_dev', '(ClassRegistry::init() Attempted to create instance of a class with a numeric name'), E_USER_WARNING); return $false; } } diff --git a/cake/libs/debugger.php b/lib/Cake/Utility/Debugger.php similarity index 96% rename from cake/libs/debugger.php rename to lib/Cake/Utility/Debugger.php index 942aa1c63..295f11d65 100644 --- a/cake/libs/debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -23,12 +23,8 @@ * Included libraries. * */ -if (!class_exists('CakeLog')) { - require_once LIBS . 'cake_log.php'; -} -if (!class_exists('String')) { - require_once LIBS . 'string.php'; -} +App::uses('CakeLog', 'Log'); +App::uses('String', 'Utility'); /** * Provide custom logging and error handling. @@ -404,12 +400,9 @@ class Debugger { } elseif (strpos($path, ROOT) === 0) { return str_replace(ROOT, 'ROOT', $path); } - $corePaths = App::core('cake'); - - foreach ($corePaths as $corePath) { - if (strpos($path, $corePath) === 0) { - return str_replace($corePath, 'CORE' .DS . 'cake' .DS, $path); - } + + if (strpos($path, LIBS) === 0) { + return str_replace($corePath, 'CORE' . DS, $path); } return $path; } @@ -654,11 +647,11 @@ class Debugger { */ public static function checkSecurityKeys() { if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') { - trigger_error(__('Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application'), E_USER_NOTICE); + trigger_error(__d('cake_dev', 'Please change the value of \'Security.salt\' in app/config/core.php to a salt value specific to your application'), E_USER_NOTICE); } if (Configure::read('Security.cipherSeed') === '76859309657453542496749683645') { - trigger_error(__('Please change the value of \'Security.cipherSeed\' in app/config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE); + trigger_error(__d('cake_dev', 'Please change the value of \'Security.cipherSeed\' in app/config/core.php to a numeric (digits only) seed value specific to your application'), E_USER_NOTICE); } } diff --git a/cake/libs/file.php b/lib/Cake/Utility/File.php similarity index 99% rename from cake/libs/file.php rename to lib/Cake/Utility/File.php index 49d030e4d..ff0eadaa1 100644 --- a/cake/libs/file.php +++ b/lib/Cake/Utility/File.php @@ -21,9 +21,7 @@ * Included libraries. * */ -if (!class_exists('Folder')) { - require LIBS . 'folder.php'; -} +App::uses('Folder', 'Utility'); /** * Convenience class for reading, writing and appending to files. diff --git a/cake/libs/folder.php b/lib/Cake/Utility/Folder.php similarity index 93% rename from cake/libs/folder.php rename to lib/Cake/Utility/Folder.php index 02b097227..f8d8f283a 100644 --- a/cake/libs/folder.php +++ b/lib/Cake/Utility/Folder.php @@ -345,11 +345,11 @@ class Folder { if ($recursive === false && is_dir($path)) { if (@chmod($path, intval($mode, 8))) { - $this->__messages[] = __('%s changed to %s', $path, $mode); + $this->__messages[] = __d('cake_dev', '%s changed to %s', $path, $mode); return true; } - $this->__errors[] = __('%s NOT changed to %s', $path, $mode); + $this->__errors[] = __d('cake_dev', '%s NOT changed to %s', $path, $mode); return false; } @@ -366,9 +366,9 @@ class Folder { } if (@chmod($fullpath, intval($mode, 8))) { - $this->__messages[] = __('%s changed to %s', $fullpath, $mode); + $this->__messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode); } else { - $this->__errors[] = __('%s NOT changed to %s', $fullpath, $mode); + $this->__errors[] = __d('cake_deverloper', '%s NOT changed to %s', $fullpath, $mode); } } } @@ -453,7 +453,7 @@ class Folder { } if (is_file($pathname)) { - $this->__errors[] = __('%s is a file', $pathname); + $this->__errors[] = __d('cake_dev', '%s is a file', $pathname); return false; } $pathname = rtrim($pathname, DS); @@ -464,11 +464,11 @@ class Folder { $old = umask(0); if (mkdir($pathname, $mode)) { umask($old); - $this->__messages[] = __('%s created', $pathname); + $this->__messages[] = __d('cake_dev', '%s created', $pathname); return true; } else { umask($old); - $this->__errors[] = __('%s NOT created', $pathname); + $this->__errors[] = __d('cake_dev', '%s NOT created', $pathname); return false; } } @@ -541,9 +541,9 @@ class Folder { } if (is_file($file) === true) { if (@unlink($file)) { - $this->__messages[] = __('%s removed', $file); + $this->__messages[] = __d('cake_dev', '%s removed', $file); } else { - $this->__errors[] = __('%s NOT removed', $file); + $this->__errors[] = __d('cake_dev', '%s NOT removed', $file); } } elseif (is_dir($file) === true && $this->delete($file) === false) { return false; @@ -552,10 +552,10 @@ class Folder { } $path = substr($path, 0, strlen($path) - 1); if (rmdir($path) === false) { - $this->__errors[] = __('%s NOT removed', $path); + $this->__errors[] = __d('cake_dev', '%s NOT removed', $path); return false; } else { - $this->__messages[] = __('%s removed', $path); + $this->__messages[] = __d('cake_dev', '%s removed', $path); } } return true; @@ -590,7 +590,7 @@ class Folder { $mode = $options['mode']; if (!$this->cd($fromDir)) { - $this->__errors[] = __('%s not found', $fromDir); + $this->__errors[] = __d('cake_dev', '%s not found', $fromDir); return false; } @@ -599,7 +599,7 @@ class Folder { } if (!is_writable($toDir)) { - $this->__errors[] = __('%s not writable', $toDir); + $this->__errors[] = __d('cake_dev', '%s not writable', $toDir); return false; } @@ -613,9 +613,9 @@ class Folder { if (copy($from, $to)) { chmod($to, intval($mode, 8)); touch($to, filemtime($from)); - $this->__messages[] = __('%s copied to %s', $from, $to); + $this->__messages[] = __d('cake_dev', '%s copied to %s', $from, $to); } else { - $this->__errors[] = __('%s NOT copied to %s', $from, $to); + $this->__errors[] = __d('cake_dev', '%s NOT copied to %s', $from, $to); } } @@ -626,11 +626,11 @@ class Folder { $old = umask(0); chmod($to, $mode); umask($old); - $this->__messages[] = __('%s created', $to); + $this->__messages[] = __d('cake_dev', '%s created', $to); $options = array_merge($options, array('to'=> $to, 'from'=> $from)); $this->copy($options); } else { - $this->__errors[] = __('%s not created', $to); + $this->__errors[] = __d('cake_dev', '%s not created', $to); } } } @@ -666,7 +666,7 @@ class Folder { $options = (array)$options; } $options = array_merge( - array('to' => $to, 'from' => $this->path, 'mode' => $this->mode, 'skip' => array()), + array('to' => $to, 'from' => $this->path, 'mode' => $this->mode, 'skip' => array()), $options ); @@ -746,4 +746,4 @@ class Folder { $lastChar = $path[strlen($path) - 1]; return $lastChar === '/' || $lastChar === '\\'; } -} +} \ No newline at end of file diff --git a/cake/libs/inflector.php b/lib/Cake/Utility/Inflector.php similarity index 100% rename from cake/libs/inflector.php rename to lib/Cake/Utility/Inflector.php diff --git a/cake/libs/object_collection.php b/lib/Cake/Utility/ObjectCollection.php similarity index 98% rename from cake/libs/object_collection.php rename to lib/Cake/Utility/ObjectCollection.php index fbff40ee0..73dfa79b3 100644 --- a/cake/libs/object_collection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -105,7 +105,7 @@ abstract class ObjectCollection { $list = array_keys($this->_loaded); } if ($options['modParams'] !== false && !isset($params[$options['modParams']])) { - throw new CakeException(__('Cannot use modParams with indexes that do not exist.')); + throw new CakeException(__d('cake_dev', 'Cannot use modParams with indexes that do not exist.')); } foreach ($list as $name) { $result = call_user_func_array(array($this->_loaded[$name], $callback), $params); diff --git a/cake/libs/sanitize.php b/lib/Cake/Utility/Sanitize.php similarity index 100% rename from cake/libs/sanitize.php rename to lib/Cake/Utility/Sanitize.php diff --git a/cake/libs/security.php b/lib/Cake/Utility/Security.php similarity index 95% rename from cake/libs/security.php rename to lib/Cake/Utility/Security.php index e8b01e2b8..fb20e187c 100644 --- a/cake/libs/security.php +++ b/lib/Cake/Utility/Security.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('String', 'Utility'); + /** * Security Library contains utility methods related to security * @@ -57,9 +59,6 @@ class Security { * @return string Hash */ public static function generateAuthKey() { - if (!class_exists('String')) { - App::import('Core', 'String'); - } return Security::hash(String::uuid()); } @@ -137,7 +136,7 @@ class Security { */ public static function cipher($text, $key) { if (empty($key)) { - trigger_error(__('You cannot use an empty key for Security::cipher()'), E_USER_WARNING); + trigger_error(__d('cake_dev', 'You cannot use an empty key for Security::cipher()'), E_USER_WARNING); return ''; } diff --git a/cake/libs/set.php b/lib/Cake/Utility/Set.php similarity index 99% rename from cake/libs/set.php rename to lib/Cake/Utility/Set.php index b16aeb59a..839372f19 100644 --- a/cake/libs/set.php +++ b/lib/Cake/Utility/Set.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('String', 'Utility'); + /** * Class used for manipulation of arrays. * @@ -42,7 +44,7 @@ class Set { $r = (array)current($args); while (($arg = next($args)) !== false) { foreach ((array)$arg as $key => $val) { - if (is_array($val) && isset($r[$key]) && is_array($r[$key])) { + if (!empty($r[$key]) && is_array($r[$key]) && is_array($val)) { $r[$key] = Set::merge($r[$key], $val); } elseif (is_int($key)) { $r[] = $val; @@ -591,15 +593,14 @@ class Set { return $data; } - if (!is_array($path)) { - if (!class_exists('String')) { - App::import('Core', 'String'); - } + if (is_string($path) && strpos($path, '{') !== false) { $path = String::tokenize($path, '.', '{', '}'); + } elseif (is_string($path)) { + $path = explode('.', $path); } $tmp = array(); - if (!is_array($path) || empty($path)) { + if (empty($path)) { return null; } @@ -673,11 +674,12 @@ class Set { } $_list =& $list; + $count = count($path); foreach ($path as $i => $key) { if (is_numeric($key) && intval($key) > 0 || $key === '0') { $key = intval($key); } - if ($i === count($path) - 1) { + if ($i === $count - 1) { $_list[$key] = $data; } else { if (!isset($_list[$key])) { diff --git a/cake/libs/string.php b/lib/Cake/Utility/String.php similarity index 100% rename from cake/libs/string.php rename to lib/Cake/Utility/String.php diff --git a/cake/libs/validation.php b/lib/Cake/Utility/Validation.php similarity index 98% rename from cake/libs/validation.php rename to lib/Cake/Utility/Validation.php index bcb679e9f..e63342f86 100644 --- a/cake/libs/validation.php +++ b/lib/Cake/Utility/Validation.php @@ -16,9 +16,8 @@ * @since CakePHP(tm) v 1.2.0.3830 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('Multibyte')) { - App::import('Core', 'Multibyte', false); -} + +App::uses('Multibyte', 'I18n'); /** * Offers different validation methods. @@ -247,7 +246,7 @@ class Validation { } break; default: - self::$errors[] = __('You must define the $operator parameter for Validation::comparison()'); + self::$errors[] = __d('cake_dev', 'You must define the $operator parameter for Validation::comparison()'); break; } return false; @@ -266,7 +265,7 @@ class Validation { extract(self::_defaults($check)); } if ($regex === null) { - self::$errors[] = __('You must define a regular expression for Validation::custom()'); + self::$errors[] = __d('cake_dev', 'You must define a regular expression for Validation::custom()'); return false; } return self::_check($check, $regex); @@ -702,7 +701,7 @@ class Validation { /** * Checks that a value is a valid uuid - http://tools.ietf.org/html/rfc4122 - * + * * @param string $check Value to check * @return boolean Success * @access public @@ -725,11 +724,11 @@ class Validation { protected static function _pass($method, $check, $classPrefix) { $className = ucwords($classPrefix) . 'Validation'; if (!class_exists($className)) { - trigger_error(__('Could not find %s class, unable to complete validation.', $className), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Could not find %s class, unable to complete validation.', $className), E_USER_WARNING); return false; } if (!method_exists($className, $method)) { - trigger_error(__('Method %s does not exist on %s unable to complete validation.', $method, $className), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Method %s does not exist on %s unable to complete validation.', $method, $className), E_USER_WARNING); return false; } $check = (array)$check; @@ -845,4 +844,4 @@ class Validation { private static function __reset() { self::$errors = array(); } -} +} \ No newline at end of file diff --git a/cake/libs/xml.php b/lib/Cake/Utility/Xml.php similarity index 94% rename from cake/libs/xml.php rename to lib/Cake/Utility/Xml.php index d0efcc310..ab2f21e42 100644 --- a/cake/libs/xml.php +++ b/lib/Cake/Utility/Xml.php @@ -100,9 +100,9 @@ class Xml { $dom->load($input); return $dom; } elseif (!is_string($input)) { - throw new XmlException(__('Invalid input.')); + throw new XmlException(__d('cake_dev', 'Invalid input.')); } - throw new XmlException(__('XML cannot be read.')); + throw new XmlException(__d('cake_dev', 'XML cannot be read.')); } /** @@ -144,11 +144,11 @@ class Xml { */ public static function fromArray($input, $options = array()) { if (!is_array($input) || count($input) !== 1) { - throw new XmlException(__('Invalid input.')); + throw new XmlException(__d('cake_dev', 'Invalid input.')); } $key = key($input); if (is_integer($key)) { - throw new XmlException(__('The key of input must be alphanumeric')); + throw new XmlException(__d('cake_dev', 'The key of input must be alphanumeric')); } if (!is_array($options)) { @@ -212,7 +212,7 @@ class Xml { } } else { if ($key[0] === '@') { - throw new XmlException(__('Invalid array')); + throw new XmlException(__d('cake_dev', 'Invalid array')); } if (array_keys($value) === range(0, count($value) - 1)) { // List foreach ($value as $item) { @@ -225,7 +225,7 @@ class Xml { } } } else { - throw new XmlException(__('Invalid array')); + throw new XmlException(__d('cake_dev', 'Invalid array')); } } } @@ -277,7 +277,7 @@ class Xml { $obj = simplexml_import_dom($obj); } if (!($obj instanceof SimpleXMLElement)) { - throw new XmlException(__('The input is not instance of SimpleXMLElement, DOMDocument or DOMNode.')); + throw new XmlException(__d('cake_dev', 'The input is not instance of SimpleXMLElement, DOMDocument or DOMNode.')); } $result = array(); $namespaces = array_merge(array('' => ''), $obj->getNamespaces(true)); diff --git a/cake/VERSION.txt b/lib/Cake/VERSION.txt similarity index 100% rename from cake/VERSION.txt rename to lib/Cake/VERSION.txt diff --git a/cake/libs/view/helper.php b/lib/Cake/View/Helper.php similarity index 87% rename from cake/libs/view/helper.php rename to lib/Cake/View/Helper.php index dd9e6476c..cba5786ad 100644 --- a/cake/libs/view/helper.php +++ b/lib/Cake/View/Helper.php @@ -19,9 +19,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('Router')) { - App::import('Core', 'Router'); -} +App::uses('Router', 'Routing'); /** * Abstract base class for all other Helpers in CakePHP. @@ -126,7 +124,7 @@ class Helper extends Object { * @param array $params Array of params for the method. */ public function __call($method, $params) { - trigger_error(__('Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING); + trigger_error(__d('cake_dev', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING); } /** @@ -240,11 +238,9 @@ class Helper extends Object { * @return string Path with a timestamp added, or not. */ public function assetTimestamp($path) { - $timestampEnabled = ( - (Configure::read('Asset.timestamp') === true && Configure::read('debug') > 0) || - Configure::read('Asset.timestamp') === 'force' - ); - if (strpos($path, '?') === false && $timestampEnabled) { + $stamp = Configure::read('Asset.timestamp'); + $timestampEnabled = $stamp === 'force' || ($stamp === true && Configure::read('debug') > 0); + if ($timestampEnabled && strpos($path, '?') === false) { $filepath = preg_replace('/^' . preg_quote($this->request->webroot, '/') . '/', '', $path); $webrootPath = WWW_ROOT . str_replace('/', DS, $filepath); if (file_exists($webrootPath)) { @@ -290,6 +286,96 @@ class Helper extends Object { return $this->__cleaned; } +/** +<<<<<<< HEAD:lib/Cake/View/Helper.php + * Returns a space-delimited string with items of the $options array. If a + * key of $options array happens to be one of: + * + * - 'compact' + * - 'checked' + * - 'declare' + * - 'readonly' + * - 'disabled' + * - 'selected' + * - 'defer' + * - 'ismap' + * - 'nohref' + * - 'noshade' + * - 'nowrap' + * - 'multiple' + * - 'noresize' + * + * And its value is one of: + * + * - '1' (string) + * - 1 (integer) + * - true (boolean) + * - 'true' (string) + * + * Then the value will be reset to be identical with key's name. + * If the value is not one of these 3, the parameter is not output. + * + * 'escape' is a special option in that it controls the conversion of + * attributes to their html-entity encoded equivalents. Set to false to disable html-encoding. + * + * If value for any option key is set to `null` or `false`, that option will be excluded from output. + * + * @param array $options Array of options. + * @param array $exclude Array of options to be excluded, the options here will not be part of the return. + * @param string $insertBefore String to be inserted before options. + * @param string $insertAfter String to be inserted after options. + * @return string Composed attributes. + */ + public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { + if (!is_string($options)) { + $options = (array) $options + array('escape' => true); + + if (!is_array($exclude)) { + $exclude = array(); + } + + $exclude = array('escape' => true) + array_flip($exclude); + $escape = $options['escape']; + $attributes = array(); + + foreach ($options as $key => $value) { + if (!isset($exclude[$key]) && $value !== false && $value !== null) { + $attributes[] = $this->_formatAttribute($key, $value, $escape); + } + } + $out = implode(' ', $attributes); + } else { + $out = $options; + } + return $out ? $insertBefore . $out . $insertAfter : ''; + } + +/** + * Formats an individual attribute, and returns the string value of the composed attribute. + * Works with minimized attributes that have the same value as their name such as 'disabled' and 'checked' + * + * @param string $key The name of the attribute to create + * @param string $value The value of the attribute to create. + * @return string The composed attribute. + */ + protected function _formatAttribute($key, $value, $escape = true) { + $attribute = ''; + if (is_array($value)) { + $value = ''; + } + + if (is_numeric($key)) { + $attribute = sprintf($this->_minimizedAttributeFormat, $value, $value); + } elseif (in_array($key, $this->_minimizedAttributes)) { + if ($value === 1 || $value === true || $value === 'true' || $value === '1' || $value == $key) { + $attribute = sprintf($this->_minimizedAttributeFormat, $key, $key); + } + } else { + $attribute = sprintf($this->_attributeFormat, $key, ($escape ? h($value) : $value)); + } + return $attribute; + } + /** * Sets this helper's model and field properties to the dot-separated value-pair in $entity. * @@ -298,7 +384,7 @@ class Helper extends Object { * @return void */ public function setEntity($entity, $setScope = false) { - $view =& $this->_View; + $view = $this->_View; if ($setScope) { $view->modelScope = false; } elseif (!empty($view->entityPath) && $view->entityPath == $entity) { @@ -345,7 +431,7 @@ class Helper extends Object { } if (ClassRegistry::isKeySet($model)) { - $ModelObj =& ClassRegistry::getObject($model); + $ModelObj = ClassRegistry::getObject($model); for ($i = 0; $i < $count; $i++) { if ( is_a($ModelObj, 'Model') && diff --git a/cake/console/templates/skel/app_helper.php b/lib/Cake/View/Helper/AppHelper.php similarity index 96% rename from cake/console/templates/skel/app_helper.php rename to lib/Cake/View/Helper/AppHelper.php index 02955a34e..b293bfaba 100644 --- a/cake/console/templates/skel/app_helper.php +++ b/lib/Cake/View/Helper/AppHelper.php @@ -19,7 +19,7 @@ * @since CakePHP(tm) v 0.2.9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Helper', false); +App::uses('Helper', 'View'); /** * This is a placeholder class. diff --git a/cake/libs/view/helpers/cache.php b/lib/Cake/View/Helper/CacheHelper.php similarity index 99% rename from cake/libs/view/helpers/cache.php rename to lib/Cake/View/Helper/CacheHelper.php index ef63994e1..5bd804474 100644 --- a/cake/libs/view/helpers/cache.php +++ b/lib/Cake/View/Helper/CacheHelper.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * CacheHelper helps create full page view caching. * diff --git a/cake/libs/view/helpers/form.php b/lib/Cake/View/Helper/FormHelper.php similarity index 98% rename from cake/libs/view/helpers/form.php rename to lib/Cake/View/Helper/FormHelper.php index d8f11c877..5140257e9 100644 --- a/cake/libs/view/helpers/form.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Form helper library. * @@ -239,12 +241,12 @@ class FormHelper extends AppHelper { $options); $this->_inputDefaults = $options['inputDefaults']; unset($options['inputDefaults']); - + if (!isset($options['id'])) { $domId = isset($options['action']) ? $options['action'] : $this->request['action']; $options['id'] = $this->domId($domId . 'Form'); } - + if ($options['action'] === null && $options['url'] === null) { $options['action'] = $this->request->here(false); } elseif (empty($options['url']) || is_array($options['url'])) { @@ -504,7 +506,7 @@ class FormHelper extends AppHelper { if ($text != null) { $error = $text; } elseif (is_numeric($error)) { - $error = __('Error in field %s', Inflector::humanize($this->field())); + $error = __d('cake', 'Error in field %s', Inflector::humanize($this->field())); } if ($options['escape']) { $error = h($error); @@ -547,7 +549,7 @@ class FormHelper extends AppHelper { if (substr($text, -3) == '_id') { $text = substr($text, 0, strlen($text) - 3); } - $text = __(Inflector::humanize(Inflector::underscore($text))); + $text = __d('cake', Inflector::humanize(Inflector::underscore($text))); } if (is_string($options)) { @@ -616,13 +618,13 @@ class FormHelper extends AppHelper { } if ($legend === true) { - $actionName = __('New %s'); + $actionName = __d('cake', 'New %s'); $isEdit = ( strpos($this->request->params['action'], 'update') !== false || strpos($this->request->params['action'], 'edit') !== false ); if ($isEdit) { - $actionName = __('Edit %s'); + $actionName = __d('cake', 'Edit %s'); } $modelName = Inflector::humanize(Inflector::underscore($model)); $legend = sprintf($actionName, __($modelName)); @@ -1122,7 +1124,7 @@ class FormHelper extends AppHelper { } /** - * Missing method handler - implements various simple input types. Is used to create inputs + * Missing method handler - implements various simple input types. Is used to create inputs * of various types. e.g. `$this->Form->text();` will create `` while * `$this->Form->range();` will create `` * @@ -1145,7 +1147,7 @@ class FormHelper extends AppHelper { public function __call($method, $params) { $options = array(); if (empty($params)) { - throw new CakeException(__('Missing field name for FormHelper::%s', $method)); + throw new CakeException(__d('cake_dev', 'Missing field name for FormHelper::%s', $method)); } if (isset($params[1])) { $options = $params[1]; @@ -1361,7 +1363,7 @@ class FormHelper extends AppHelper { */ public function submit($caption = null, $options = array()) { if (!is_string($caption) && empty($caption)) { - $caption = __('Submit'); + $caption = __d('cake', 'Submit'); } $out = null; $div = true; @@ -2017,7 +2019,7 @@ class FormHelper extends AppHelper { function __selectOptions($elements = array(), $parents = array(), $showParents = null, $attributes = array()) { $select = array(); $attributes = array_merge( - array('escape' => true, 'style' => null, 'value' => null, 'class' => null), + array('escape' => true, 'style' => null, 'value' => null, 'class' => null), $attributes ); $selectedIsEmpty = ($attributes['value'] === '' || $attributes['value'] === null); @@ -2155,18 +2157,18 @@ class FormHelper extends AppHelper { break; case 'month': if ($options['monthNames'] === true) { - $data['01'] = __('January'); - $data['02'] = __('February'); - $data['03'] = __('March'); - $data['04'] = __('April'); - $data['05'] = __('May'); - $data['06'] = __('June'); - $data['07'] = __('July'); - $data['08'] = __('August'); - $data['09'] = __('September'); - $data['10'] = __('October'); - $data['11'] = __('November'); - $data['12'] = __('December'); + $data['01'] = __d('cake', 'January'); + $data['02'] = __d('cake', 'February'); + $data['03'] = __d('cake', 'March'); + $data['04'] = __d('cake', 'April'); + $data['05'] = __d('cake', 'May'); + $data['06'] = __d('cake', 'June'); + $data['07'] = __d('cake', 'July'); + $data['08'] = __d('cake', 'August'); + $data['09'] = __d('cake', 'September'); + $data['10'] = __d('cake', 'October'); + $data['11'] = __d('cake', 'November'); + $data['12'] = __d('cake', 'December'); } else if (is_array($options['monthNames'])) { $data = $options['monthNames']; } else { diff --git a/cake/libs/view/helpers/html.php b/lib/Cake/View/Helper/HtmlHelper.php similarity index 98% rename from cake/libs/view/helpers/html.php rename to lib/Cake/View/Helper/HtmlHelper.php index 52458329c..f10afa305 100644 --- a/cake/libs/view/helpers/html.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -16,6 +16,9 @@ * @since CakePHP(tm) v 0.9.1 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('AppHelper', 'View/Helper'); + /** * Html Helper class for easy use of HTML widgets. * @@ -937,12 +940,13 @@ class HtmlHelper extends AppHelper { $reader = $configFile[1]; } } else { - throw new ConfigureException(__('Cannot load the configuration file. Wrong "configFile" configuration.')); + throw new ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Wrong "configFile" configuration.')); } $readerClass = Inflector::camelize($reader) . 'Reader'; - if (!App::import('Lib', 'config/' . $readerClass)) { - throw new ConfigureException(__('Cannot load the configuration file. Unknown reader.')); + App::uses($readerClass, 'Configure'); + if (!class_exists($readerClass)) { + throw new ConfigureException(__d('cake_dev', 'Cannot load the configuration file. Unknown reader.')); } $readerObj = new $readerClass($path); diff --git a/cake/libs/view/helpers/jquery_engine.php b/lib/Cake/View/Helper/JqueryEngineHelper.php similarity index 99% rename from cake/libs/view/helpers/jquery_engine.php rename to lib/Cake/View/Helper/JqueryEngineHelper.php index 2644acadd..91e22d033 100644 --- a/cake/libs/view/helpers/jquery_engine.php +++ b/lib/Cake/View/Helper/JqueryEngineHelper.php @@ -21,7 +21,9 @@ * @package cake.libs.view.helpers * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); + +App::uses('AppHelper', 'View/Helper'); +App::uses('JsBaseEngineHelper', 'View/Helper'); class JqueryEngineHelper extends JsBaseEngineHelper { /** diff --git a/cake/libs/view/helpers/js.php b/lib/Cake/View/Helper/JsBaseEngineHelper.php similarity index 58% rename from cake/libs/view/helpers/js.php rename to lib/Cake/View/Helper/JsBaseEngineHelper.php index 801d6a3cd..ade4ca558 100644 --- a/cake/libs/view/helpers/js.php +++ b/lib/Cake/View/Helper/JsBaseEngineHelper.php @@ -1,6 +1,6 @@ __engineName = $className . 'Engine'; - $engineClass = $engineName . 'Engine'; - $this->helpers[] = $engineClass; - parent::__construct($View, $settings); - } - -/** - * call__ Allows for dispatching of methods to the Engine Helper. - * methods in the Engines bufferedMethods list will be automatically buffered. - * You can control buffering with the buffer param as well. By setting the last parameter to - * any engine method to a boolean you can force or disable buffering. - * - * e.g. `$js->get('#foo')->effect('fadeIn', array('speed' => 'slow'), true);` - * - * Will force buffering for the effect method. If the method takes an options array you may also add - * a 'buffer' param to the options array and control buffering there as well. - * - * e.g. `$js->get('#foo')->event('click', $functionContents, array('buffer' => true));` - * - * The buffer parameter will not be passed onto the EngineHelper. - * - * @param string $method Method to be called - * @param array $params Parameters for the method being called. - * @return mixed Depends on the return of the dispatched method, or it could be an instance of the EngineHelper - */ - public function __call($method, $params) { - if ($this->{$this->__engineName} && method_exists($this->{$this->__engineName}, $method)) { - $buffer = false; - $engineHelper = $this->{$this->__engineName}; - if (in_array(strtolower($method), $engineHelper->bufferedMethods)) { - $buffer = true; - } - if (count($params) > 0) { - $lastParam = $params[count($params) - 1]; - $hasBufferParam = (is_bool($lastParam) || is_array($lastParam) && isset($lastParam['buffer'])); - if ($hasBufferParam && is_bool($lastParam)) { - $buffer = $lastParam; - unset($params[count($params) - 1]); - } elseif ($hasBufferParam && is_array($lastParam)) { - $buffer = $lastParam['buffer']; - unset($params['buffer']); - } - } - - $out = call_user_func_array(array(&$engineHelper, $method), $params); - if ($this->bufferScripts && $buffer && is_string($out)) { - $this->buffer($out); - return null; - } - if (is_object($out) && is_a($out, 'JsBaseEngineHelper')) { - return $this; - } - return $out; - } - if (method_exists($this, $method . '_')) { - return call_user_func(array(&$this, $method . '_'), $params); - } - trigger_error(__('JsHelper:: Missing Method %s is undefined', $method), E_USER_WARNING); - } - -/** - * Overwrite inherited Helper::value() - * See JsBaseEngineHelper::value() for more information on this method. - * - * @param mixed $val A PHP variable to be converted to JSON - * @param boolean $quoteStrings If false, leaves string values unquoted - * @return string a JavaScript-safe/JSON representation of $val - * @access public - **/ - function value($val, $quoteString = true) { - return $this->{$this->__engineName}->value($val, $quoteString); - } - -/** - * Writes all Javascript generated so far to a code block or - * caches them to a file and returns a linked script. If no scripts have been - * buffered this method will return null. If the request is an XHR(ajax) request - * onDomReady will be set to false. As the dom is already 'ready'. - * - * ### Options - * - * - `inline` - Set to true to have scripts output as a script block inline - * if `cache` is also true, a script link tag will be generated. (default true) - * - `cache` - Set to true to have scripts cached to a file and linked in (default false) - * - `clear` - Set to false to prevent script cache from being cleared (default true) - * - `onDomReady` - wrap cached scripts in domready event (default true) - * - `safe` - if an inline block is generated should it be wrapped in (default true) - * - * @param array $options options for the code block - * @return mixed Completed javascript tag if there are scripts, if there are no buffered - * scripts null will be returned. - */ - public function writeBuffer($options = array()) { - $domReady = $this->request->is('ajax'); - $defaults = array( - 'onDomReady' => $domReady, 'inline' => true, - 'cache' => false, 'clear' => true, 'safe' => true - ); - $options = array_merge($defaults, $options); - $script = implode("\n", $this->getBuffer($options['clear'])); - - if (empty($script)) { - return null; - } - - if ($options['onDomReady']) { - $script = $this->{$this->__engineName}->domReady($script); - } - $opts = $options; - unset($opts['onDomReady'], $opts['cache'], $opts['clear']); - - if (!$options['cache'] && $options['inline']) { - return $this->Html->scriptBlock($script, $opts); - } - - if ($options['cache'] && $options['inline']) { - $filename = md5($script); - if (!file_exists(JS . $filename . '.js')) { - cache(str_replace(WWW_ROOT, '', JS) . $filename . '.js', $script, '+999 days', 'public'); - } - return $this->Html->script($filename); - } - $this->Html->scriptBlock($script, $opts); - return null; - } - -/** - * Write a script to the buffered scripts. - * - * @param string $script Script string to add to the buffer. - * @param boolean $top If true the script will be added to the top of the - * buffered scripts array. If false the bottom. - * @return void - */ - public function buffer($script, $top = false) { - if ($top) { - array_unshift($this->__bufferedScripts, $script); - } else { - $this->__bufferedScripts[] = $script; - } - } - -/** - * Get all the buffered scripts - * - * @param boolean $clear Whether or not to clear the script caches (default true) - * @return array Array of scripts added to the request. - */ - public function getBuffer($clear = true) { - $this->_createVars(); - $scripts = $this->__bufferedScripts; - if ($clear) { - $this->__bufferedScripts = array(); - $this->__jsVars = array(); - } - return $scripts; - } - -/** - * Generates the object string for variables passed to javascript. - * - * @return string Generated JSON object of all set vars - */ - protected function _createVars() { - if (!empty($this->__jsVars)) { - $setVar = (strpos($this->setVariable, '.')) ? $this->setVariable : 'window.' . $this->setVariable; - $this->buffer($setVar . ' = ' . $this->object($this->__jsVars) . ';', true); - } - } - -/** - * Generate an 'Ajax' link. Uses the selected JS engine to create a link - * element that is enhanced with Javascript. Options can include - * both those for HtmlHelper::link() and JsBaseEngine::request(), JsBaseEngine::event(); - * - * ### Options - * - * - `confirm` - Generate a confirm() dialog before sending the event. - * - `id` - use a custom id. - * - `htmlAttributes` - additional non-standard htmlAttributes. Standard attributes are class, id, - * rel, title, escape, onblur and onfocus. - * - `buffer` - Disable the buffering and return a script tag in addition to the link. - * - * @param string $title Title for the link. - * @param mixed $url Mixed either a string URL or an cake url array. - * @param array $options Options for both the HTML element and Js::request() - * @return string Completed link. If buffering is disabled a script tag will be returned as well. - */ - public function link($title, $url = null, $options = array()) { - if (!isset($options['id'])) { - $options['id'] = 'link-' . intval(mt_rand()); - } - list($options, $htmlOptions) = $this->_getHtmlOptions($options); - $out = $this->Html->link($title, $url, $htmlOptions); - $this->get('#' . $htmlOptions['id']); - $requestString = $event = ''; - if (isset($options['confirm'])) { - $requestString = $this->confirmReturn($options['confirm']); - unset($options['confirm']); - } - $buffer = isset($options['buffer']) ? $options['buffer'] : null; - $safe = isset($options['safe']) ? $options['safe'] : true; - unset($options['buffer'], $options['safe']); - - $requestString .= $this->request($url, $options); - - if (!empty($requestString)) { - $event = $this->event('click', $requestString, $options + array('buffer' => $buffer)); - } - if (isset($buffer) && !$buffer) { - $opts = array('safe' => $safe); - $out .= $this->Html->scriptBlock($event, $opts); - } - return $out; - } - -/** - * Pass variables into Javascript. Allows you to set variables that will be - * output when the buffer is fetched with `JsHelper::getBuffer()` or `JsHelper::writeBuffer()` - * The Javascript variable used to output set variables can be controlled with `JsHelper::$setVariable` - * - * @param mixed $one Either an array of variables to set, or the name of the variable to set. - * @param mixed $two If $one is a string, $two is the value for that key. - * @return void - */ - public function set($one, $two = null) { - $data = null; - if (is_array($one)) { - if (is_array($two)) { - $data = array_combine($one, $two); - } else { - $data = $one; - } - } else { - $data = array($one => $two); - } - if ($data == null) { - return false; - } - $this->__jsVars = array_merge($this->__jsVars, $data); - } - -/** - * Uses the selected JS engine to create a submit input - * element that is enhanced with Javascript. Options can include - * both those for FormHelper::submit() and JsBaseEngine::request(), JsBaseEngine::event(); - * - * Forms submitting with this method, cannot send files. Files do not transfer over XmlHttpRequest - * and require an iframe or flash. - * - * ### Options - * - * - `url` The url you wish the XHR request to submit to. - * - `confirm` A string to use for a confirm() message prior to submitting the request. - * - `method` The method you wish the form to send by, defaults to POST - * - `buffer` Whether or not you wish the script code to be buffered, defaults to true. - * - Also see options for JsHelper::request() and JsHelper::event() - * - * @param string $title The display text of the submit button. - * @param array $options Array of options to use. See the options for the above mentioned methods. - * @return string Completed submit button. - */ - public function submit($caption = null, $options = array()) { - if (!isset($options['id'])) { - $options['id'] = 'submit-' . intval(mt_rand()); - } - $formOptions = array('div'); - list($options, $htmlOptions) = $this->_getHtmlOptions($options, $formOptions); - $out = $this->Form->submit($caption, $htmlOptions); - - $this->get('#' . $htmlOptions['id']); - - $options['data'] = $this->serializeForm(array('isForm' => false, 'inline' => true)); - $requestString = $url = ''; - if (isset($options['confirm'])) { - $requestString = $this->confirmReturn($options['confirm']); - unset($options['confirm']); - } - if (isset($options['url'])) { - $url = $options['url']; - unset($options['url']); - } - if (!isset($options['method'])) { - $options['method'] = 'post'; - } - $options['dataExpression'] = true; - - $buffer = isset($options['buffer']) ? $options['buffer'] : null; - $safe = isset($options['safe']) ? $options['safe'] : true; - unset($options['buffer'], $options['safe']); - - $requestString .= $this->request($url, $options); - if (!empty($requestString)) { - $event = $this->event('click', $requestString, $options + array('buffer' => $buffer)); - } - if (isset($buffer) && !$buffer) { - $opts = array('safe' => $safe); - $out .= $this->Html->scriptBlock($event, $opts); - } - return $out; - } - -/** - * Parse a set of Options and extract the Html options. - * Extracted Html Options are removed from the $options param. - * - * @param array $options Options to filter. - * @param array $additional Array of additional keys to extract and include in the return options array. - * @return array Array of js options and Htmloptions - */ - protected function _getHtmlOptions($options, $additional = array()) { - $htmlKeys = array_merge( - array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title', 'style'), - $additional - ); - $htmlOptions = array(); - foreach ($htmlKeys as $key) { - if (isset($options[$key])) { - $htmlOptions[$key] = $options[$key]; - } - unset($options[$key]); - } - if (isset($options['htmlAttributes'])) { - $htmlOptions = array_merge($htmlOptions, $options['htmlAttributes']); - unset($options['htmlAttributes']); - } - return array($options, $htmlOptions); - } -} +App::uses('AppHelper', 'View/Helper'); /** * JsEngineBaseClass @@ -477,8 +73,6 @@ abstract class JsBaseEngineHelper extends AppHelper { /** * Constructor. * - * @param View $View The View this helper is attached to. - * @param array $settings An array of settings. */ function __construct($View, $settings = array()) { parent::__construct($View, $settings); @@ -653,7 +247,6 @@ abstract class JsBaseEngineHelper extends AppHelper { * @return string Escaped string. */ public function escape($string) { - App::import('Core', 'Multibyte'); return $this->_utf8ToHex($string); } @@ -1056,4 +649,4 @@ abstract class JsBaseEngineHelper extends AppHelper { } return $out; } -} +} \ No newline at end of file diff --git a/lib/Cake/View/Helper/JsHelper.php b/lib/Cake/View/Helper/JsHelper.php new file mode 100644 index 000000000..c9b3ecb4a --- /dev/null +++ b/lib/Cake/View/Helper/JsHelper.php @@ -0,0 +1,427 @@ +__engineName = $className . 'Engine'; + $engineClass = $engineName . 'Engine'; + $this->helpers[] = $engineClass; + parent::__construct($View, $settings); + } + +/** + * call__ Allows for dispatching of methods to the Engine Helper. + * methods in the Engines bufferedMethods list will be automatically buffered. + * You can control buffering with the buffer param as well. By setting the last parameter to + * any engine method to a boolean you can force or disable buffering. + * + * e.g. `$js->get('#foo')->effect('fadeIn', array('speed' => 'slow'), true);` + * + * Will force buffering for the effect method. If the method takes an options array you may also add + * a 'buffer' param to the options array and control buffering there as well. + * + * e.g. `$js->get('#foo')->event('click', $functionContents, array('buffer' => true));` + * + * The buffer parameter will not be passed onto the EngineHelper. + * + * @param string $method Method to be called + * @param array $params Parameters for the method being called. + * @return mixed Depends on the return of the dispatched method, or it could be an instance of the EngineHelper + */ + public function __call($method, $params) { + if ($this->{$this->__engineName} && method_exists($this->{$this->__engineName}, $method)) { + $buffer = false; + $engineHelper = $this->{$this->__engineName}; + if (in_array(strtolower($method), $engineHelper->bufferedMethods)) { + $buffer = true; + } + if (count($params) > 0) { + $lastParam = $params[count($params) - 1]; + $hasBufferParam = (is_bool($lastParam) || is_array($lastParam) && isset($lastParam['buffer'])); + if ($hasBufferParam && is_bool($lastParam)) { + $buffer = $lastParam; + unset($params[count($params) - 1]); + } elseif ($hasBufferParam && is_array($lastParam)) { + $buffer = $lastParam['buffer']; + unset($params['buffer']); + } + } + + $out = call_user_func_array(array(&$engineHelper, $method), $params); + if ($this->bufferScripts && $buffer && is_string($out)) { + $this->buffer($out); + return null; + } + if (is_object($out) && is_a($out, 'JsBaseEngineHelper')) { + return $this; + } + return $out; + } + if (method_exists($this, $method . '_')) { + return call_user_func(array(&$this, $method . '_'), $params); + } + trigger_error(__d('cake_dev', 'JsHelper:: Missing Method %s is undefined', $method), E_USER_WARNING); + } + +/** + * Overwrite inherited Helper::value() + * See JsBaseEngineHelper::value() for more information on this method. + * + * @param mixed $val A PHP variable to be converted to JSON + * @param boolean $quoteStrings If false, leaves string values unquoted + * @return string a JavaScript-safe/JSON representation of $val + * @access public + **/ + function value($val, $quoteString = true) { + return $this->{$this->__engineName}->value($val, $quoteString); + } + +/** + * Writes all Javascript generated so far to a code block or + * caches them to a file and returns a linked script. If no scripts have been + * buffered this method will return null. If the request is an XHR(ajax) request + * onDomReady will be set to false. As the dom is already 'ready'. + * + * ### Options + * + * - `inline` - Set to true to have scripts output as a script block inline + * if `cache` is also true, a script link tag will be generated. (default true) + * - `cache` - Set to true to have scripts cached to a file and linked in (default false) + * - `clear` - Set to false to prevent script cache from being cleared (default true) + * - `onDomReady` - wrap cached scripts in domready event (default true) + * - `safe` - if an inline block is generated should it be wrapped in (default true) + * + * @param array $options options for the code block + * @return mixed Completed javascript tag if there are scripts, if there are no buffered + * scripts null will be returned. + */ + public function writeBuffer($options = array()) { + $domReady = $this->request->is('ajax'); + $defaults = array( + 'onDomReady' => $domReady, 'inline' => true, + 'cache' => false, 'clear' => true, 'safe' => true + ); + $options = array_merge($defaults, $options); + $script = implode("\n", $this->getBuffer($options['clear'])); + + if (empty($script)) { + return null; + } + + if ($options['onDomReady']) { + $script = $this->{$this->__engineName}->domReady($script); + } + $opts = $options; + unset($opts['onDomReady'], $opts['cache'], $opts['clear']); + + if (!$options['cache'] && $options['inline']) { + return $this->Html->scriptBlock($script, $opts); + } + + if ($options['cache'] && $options['inline']) { + $filename = md5($script); + if (!file_exists(JS . $filename . '.js')) { + cache(str_replace(WWW_ROOT, '', JS) . $filename . '.js', $script, '+999 days', 'public'); + } + return $this->Html->script($filename); + } + $this->Html->scriptBlock($script, $opts); + return null; + } + +/** + * Write a script to the buffered scripts. + * + * @param string $script Script string to add to the buffer. + * @param boolean $top If true the script will be added to the top of the + * buffered scripts array. If false the bottom. + * @return void + */ + public function buffer($script, $top = false) { + if ($top) { + array_unshift($this->__bufferedScripts, $script); + } else { + $this->__bufferedScripts[] = $script; + } + } + +/** + * Get all the buffered scripts + * + * @param boolean $clear Whether or not to clear the script caches (default true) + * @return array Array of scripts added to the request. + */ + public function getBuffer($clear = true) { + $this->_createVars(); + $scripts = $this->__bufferedScripts; + if ($clear) { + $this->__bufferedScripts = array(); + $this->__jsVars = array(); + } + return $scripts; + } + +/** + * Generates the object string for variables passed to javascript. + * + * @return string Generated JSON object of all set vars + */ + protected function _createVars() { + if (!empty($this->__jsVars)) { + $setVar = (strpos($this->setVariable, '.')) ? $this->setVariable : 'window.' . $this->setVariable; + $this->buffer($setVar . ' = ' . $this->object($this->__jsVars) . ';', true); + } + } + +/** + * Generate an 'Ajax' link. Uses the selected JS engine to create a link + * element that is enhanced with Javascript. Options can include + * both those for HtmlHelper::link() and JsBaseEngine::request(), JsBaseEngine::event(); + * + * ### Options + * + * - `confirm` - Generate a confirm() dialog before sending the event. + * - `id` - use a custom id. + * - `htmlAttributes` - additional non-standard htmlAttributes. Standard attributes are class, id, + * rel, title, escape, onblur and onfocus. + * - `buffer` - Disable the buffering and return a script tag in addition to the link. + * + * @param string $title Title for the link. + * @param mixed $url Mixed either a string URL or an cake url array. + * @param array $options Options for both the HTML element and Js::request() + * @return string Completed link. If buffering is disabled a script tag will be returned as well. + */ + public function link($title, $url = null, $options = array()) { + if (!isset($options['id'])) { + $options['id'] = 'link-' . intval(mt_rand()); + } + list($options, $htmlOptions) = $this->_getHtmlOptions($options); + $out = $this->Html->link($title, $url, $htmlOptions); + $this->get('#' . $htmlOptions['id']); + $requestString = $event = ''; + if (isset($options['confirm'])) { + $requestString = $this->confirmReturn($options['confirm']); + unset($options['confirm']); + } + $buffer = isset($options['buffer']) ? $options['buffer'] : null; + $safe = isset($options['safe']) ? $options['safe'] : true; + unset($options['buffer'], $options['safe']); + + $requestString .= $this->request($url, $options); + + if (!empty($requestString)) { + $event = $this->event('click', $requestString, $options + array('buffer' => $buffer)); + } + if (isset($buffer) && !$buffer) { + $opts = array('safe' => $safe); + $out .= $this->Html->scriptBlock($event, $opts); + } + return $out; + } + +/** + * Pass variables into Javascript. Allows you to set variables that will be + * output when the buffer is fetched with `JsHelper::getBuffer()` or `JsHelper::writeBuffer()` + * The Javascript variable used to output set variables can be controlled with `JsHelper::$setVariable` + * + * @param mixed $one Either an array of variables to set, or the name of the variable to set. + * @param mixed $two If $one is a string, $two is the value for that key. + * @return void + */ + public function set($one, $two = null) { + $data = null; + if (is_array($one)) { + if (is_array($two)) { + $data = array_combine($one, $two); + } else { + $data = $one; + } + } else { + $data = array($one => $two); + } + if ($data == null) { + return false; + } + $this->__jsVars = array_merge($this->__jsVars, $data); + } + +/** + * Uses the selected JS engine to create a submit input + * element that is enhanced with Javascript. Options can include + * both those for FormHelper::submit() and JsBaseEngine::request(), JsBaseEngine::event(); + * + * Forms submitting with this method, cannot send files. Files do not transfer over XmlHttpRequest + * and require an iframe or flash. + * + * ### Options + * + * - `url` The url you wish the XHR request to submit to. + * - `confirm` A string to use for a confirm() message prior to submitting the request. + * - `method` The method you wish the form to send by, defaults to POST + * - `buffer` Whether or not you wish the script code to be buffered, defaults to true. + * - Also see options for JsHelper::request() and JsHelper::event() + * + * @param string $title The display text of the submit button. + * @param array $options Array of options to use. See the options for the above mentioned methods. + * @return string Completed submit button. + */ + public function submit($caption = null, $options = array()) { + if (!isset($options['id'])) { + $options['id'] = 'submit-' . intval(mt_rand()); + } + $formOptions = array('div'); + list($options, $htmlOptions) = $this->_getHtmlOptions($options, $formOptions); + $out = $this->Form->submit($caption, $htmlOptions); + + $this->get('#' . $htmlOptions['id']); + + $options['data'] = $this->serializeForm(array('isForm' => false, 'inline' => true)); + $requestString = $url = ''; + if (isset($options['confirm'])) { + $requestString = $this->confirmReturn($options['confirm']); + unset($options['confirm']); + } + if (isset($options['url'])) { + $url = $options['url']; + unset($options['url']); + } + if (!isset($options['method'])) { + $options['method'] = 'post'; + } + $options['dataExpression'] = true; + + $buffer = isset($options['buffer']) ? $options['buffer'] : null; + $safe = isset($options['safe']) ? $options['safe'] : true; + unset($options['buffer'], $options['safe']); + + $requestString .= $this->request($url, $options); + if (!empty($requestString)) { + $event = $this->event('click', $requestString, $options + array('buffer' => $buffer)); + } + if (isset($buffer) && !$buffer) { + $opts = array('safe' => $safe); + $out .= $this->Html->scriptBlock($event, $opts); + } + return $out; + } + +/** + * Parse a set of Options and extract the Html options. + * Extracted Html Options are removed from the $options param. + * + * @param array $options Options to filter. + * @param array $additional Array of additional keys to extract and include in the return options array. + * @return array Array of js options and Htmloptions + */ + protected function _getHtmlOptions($options, $additional = array()) { + $htmlKeys = array_merge( + array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title', 'style'), + $additional + ); + $htmlOptions = array(); + foreach ($htmlKeys as $key) { + if (isset($options[$key])) { + $htmlOptions[$key] = $options[$key]; + } + unset($options[$key]); + } + if (isset($options['htmlAttributes'])) { + $htmlOptions = array_merge($htmlOptions, $options['htmlAttributes']); + unset($options['htmlAttributes']); + } + return array($options, $htmlOptions); + } +} \ No newline at end of file diff --git a/cake/libs/view/helpers/mootools_engine.php b/lib/Cake/View/Helper/MootoolsEngineHelper.php similarity index 98% rename from cake/libs/view/helpers/mootools_engine.php rename to lib/Cake/View/Helper/MootoolsEngineHelper.php index 0b3e50af8..726ca624b 100644 --- a/cake/libs/view/helpers/mootools_engine.php +++ b/lib/Cake/View/Helper/MootoolsEngineHelper.php @@ -24,7 +24,8 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); + +App::uses('JsBaseEngineHelper', 'View/Helper'); class MootoolsEngineHelper extends JsBaseEngineHelper { /** @@ -306,7 +307,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper { function drop($options = array()) { if (empty($options['drag'])) { trigger_error( - __('MootoolsEngine::drop() requires a "drag" option to properly function'), E_USER_WARNING + __d('cake_dev', 'MootoolsEngine::drop() requires a "drag" option to properly function'), E_USER_WARNING ); return false; } diff --git a/cake/libs/view/helpers/number.php b/lib/Cake/View/Helper/NumberHelper.php similarity index 94% rename from cake/libs/view/helpers/number.php rename to lib/Cake/View/Helper/NumberHelper.php index 8c9a2e665..011d5d9eb 100644 --- a/cake/libs/view/helpers/number.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -19,6 +19,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Number helper library. * @@ -86,15 +88,15 @@ class NumberHelper extends AppHelper { public function toReadableSize($size) { switch (true) { case $size < 1024: - return __n('%d Byte', '%d Bytes', $size, $size); + return __dn('cake', '%d Byte', '%d Bytes', $size, $size); case round($size / 1024) < 1024: - return __('%d KB', $this->precision($size / 1024, 0)); + return __d('cake', '%d KB', $this->precision($size / 1024, 0)); case round($size / 1024 / 1024, 2) < 1024: - return __('%.2f MB', $this->precision($size / 1024 / 1024, 2)); + return __d('cake', '%.2f MB', $this->precision($size / 1024 / 1024, 2)); case round($size / 1024 / 1024 / 1024, 2) < 1024: - return __('%.2f GB', $this->precision($size / 1024 / 1024 / 1024, 2)); + return __d('cake', '%.2f GB', $this->precision($size / 1024 / 1024 / 1024, 2)); default: - return __('%.2f TB', $this->precision($size / 1024 / 1024 / 1024 / 1024, 2)); + return __d('cake', '%.2f TB', $this->precision($size / 1024 / 1024 / 1024 / 1024, 2)); } } @@ -162,7 +164,7 @@ class NumberHelper extends AppHelper { * ### Options * * - `before` - The currency symbol to place before whole numbers ie. '$' - * - `after` - The currency symbol to place after decimal numbers ie. 'c'. Set to boolean false to + * - `after` - The currency symbol to place after decimal numbers ie. 'c'. Set to boolean false to * use no decimal symbol. eg. 0.35 => $0.35. * - `zero` - The text to use for zero values, can be a string or a number. ie. 0, 'Free!' * - `places` - Number of decimal places to use. ie. 2 @@ -213,7 +215,7 @@ class NumberHelper extends AppHelper { } } - $position = $options[$symbolKey.'Position'] != 'after' ? 'before' : 'after'; + $position = $options[$symbolKey.'Position'] != 'after' ? 'before' : 'after'; $options[$position] = $options[$symbolKey.'Symbol']; $abs = abs($number); @@ -234,7 +236,7 @@ class NumberHelper extends AppHelper { * currency formats easier. * * {{{ $number->addFormat('NOK', array('before' => 'Kr. ')); }}} - * + * * You can now use `NOK` as a shortform when formatting currency amounts. * * {{{ $number->currency($value, 'NOK'); }}} @@ -257,4 +259,4 @@ class NumberHelper extends AppHelper { $this->_currencies[$formatName] = $options + $this->_currencyDefaults; } -} +} \ No newline at end of file diff --git a/cake/libs/view/helpers/paginator.php b/lib/Cake/View/Helper/PaginatorHelper.php old mode 100755 new mode 100644 similarity index 98% rename from cake/libs/view/helpers/paginator.php rename to lib/Cake/View/Helper/PaginatorHelper.php index e84ed1a74..fc8650e31 --- a/cake/libs/view/helpers/paginator.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Pagination Helper class for easy generation of pagination links. * @@ -67,7 +69,7 @@ class PaginatorHelper extends AppHelper { * - `escape` Defines if the title field for the link should be escaped (default: true). * - `update` DOM id of the element updated with the results of the AJAX call. * If this key isn't specified Paginator will use plain HTML links. - * - `paging['paramType']` The type of parameters to use when creating links. Valid options are + * - `paging['paramType']` The type of parameters to use when creating links. Valid options are * 'querystring', 'named', and 'route'. See PaginatorComponent::$settings for more information. * - `convertKeys` - A list of keys in url arrays that should be converted to querysting params * if paramType == 'querystring'. @@ -96,13 +98,11 @@ class PaginatorHelper extends AppHelper { $ajaxProvider = isset($settings['ajax']) ? $settings['ajax'] : 'Js'; $this->helpers[] = $ajaxProvider; $this->_ajaxHelperClass = $ajaxProvider; - if (!class_exists($ajaxProvider . 'Helper')) { - App::import('Helper', $ajaxProvider); - } + App::uses($ajaxProvider . 'Helper', 'View/Helper'); $classname = $ajaxProvider . 'Helper'; if (!method_exists($classname, 'link')) { throw new CakeException(sprintf( - __('%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname + __d('cake_dev', '%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname )); } parent::__construct($View, $settings); @@ -314,7 +314,7 @@ class PaginatorHelper extends AppHelper { $sortKey = $this->sortKey($options['model']); $defaultModel = $this->defaultModel(); $isSorted = ( - $sortKey === $key || + $sortKey === $key || $sortKey === $defaultModel . '.' . $key || $key === $defaultModel . '.' . $sortKey ); @@ -553,7 +553,7 @@ class PaginatorHelper extends AppHelper { array( 'model' => $this->defaultModel(), 'format' => 'pages', - 'separator' => __(' of ') + 'separator' => __d('cake', ' of ') ), $options); @@ -603,12 +603,12 @@ class PaginatorHelper extends AppHelper { /** * Returns a set of numbers for the paged result set - * uses a modulus to decide how many numbers to show on each side of the current page (default: 8). + * uses a modulus to decide how many numbers to show on each side of the current page (default: 8). * * `$this->Paginator->numbers(array('first' => 2, 'last' => 2));` * * Using the first and last options you can create links to the beginning and end of the page set. - * + * * * ### Options * @@ -862,4 +862,4 @@ class PaginatorHelper extends AppHelper { } return $out; } -} +} \ No newline at end of file diff --git a/cake/libs/view/helpers/prototype_engine.php b/lib/Cake/View/Helper/PrototypeEngineHelper.php similarity index 99% rename from cake/libs/view/helpers/prototype_engine.php rename to lib/Cake/View/Helper/PrototypeEngineHelper.php index 17706d8e1..79c5ac17a 100644 --- a/cake/libs/view/helpers/prototype_engine.php +++ b/lib/Cake/View/Helper/PrototypeEngineHelper.php @@ -19,7 +19,8 @@ * @since CakePHP(tm) v 1.3 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Helper', 'Js'); + +App::uses('JsBaseEngineHelper', 'View/Helper'); class PrototypeEngineHelper extends JsBaseEngineHelper { /** diff --git a/cake/libs/view/helpers/rss.php b/lib/Cake/View/Helper/RssHelper.php similarity index 99% rename from cake/libs/view/helpers/rss.php rename to lib/Cake/View/Helper/RssHelper.php index c1b7d219d..890e7c603 100644 --- a/cake/libs/view/helpers/rss.php +++ b/lib/Cake/View/Helper/RssHelper.php @@ -16,7 +16,9 @@ * @since CakePHP(tm) v 1.2 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('Core', 'Xml'); + +App::uses('AppHelper', 'View/Helper'); +App::uses('Xml', 'Utility'); /** * RSS Helper class for easy output RSS structures. diff --git a/cake/libs/view/helpers/session.php b/lib/Cake/View/Helper/SessionHelper.php similarity index 98% rename from cake/libs/view/helpers/session.php rename to lib/Cake/View/Helper/SessionHelper.php index 6dcf90294..eaa5260af 100644 --- a/cake/libs/view/helpers/session.php +++ b/lib/Cake/View/Helper/SessionHelper.php @@ -16,9 +16,10 @@ * @since CakePHP(tm) v 1.1.7.3328 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -if (!class_exists('CakeSession')) { - require LIBS . 'cake_session.php'; -} + +App::uses('AppHelper', 'View/Helper'); +App::uses('CakeSession', 'Model/Datasource'); + /** * Session Helper. * diff --git a/cake/libs/view/helpers/text.php b/lib/Cake/View/Helper/TextHelper.php similarity index 98% rename from cake/libs/view/helpers/text.php rename to lib/Cake/View/Helper/TextHelper.php index 307859513..4195c3ac0 100644 --- a/cake/libs/view/helpers/text.php +++ b/lib/Cake/View/Helper/TextHelper.php @@ -23,12 +23,9 @@ * Included libraries. * */ -if (!class_exists('HtmlHelper')) { - App::import('Helper', 'Html'); -} -if (!class_exists('Multibyte')) { - App::import('Core', 'Multibyte'); -} +App::uses('AppHelper', 'View/Helper'); +App::uses('HtmlHelper', 'Helper'); +App::uses('Multibyte', 'I18n'); /** * Text helper library. diff --git a/cake/libs/view/helpers/time.php b/lib/Cake/View/Helper/TimeHelper.php similarity index 93% rename from cake/libs/view/helpers/time.php rename to lib/Cake/View/Helper/TimeHelper.php index 901c0a074..64781b79e 100644 --- a/cake/libs/view/helpers/time.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -17,6 +17,8 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ +App::uses('AppHelper', 'View/Helper'); + /** * Time Helper class for easy use of time data. * @@ -80,19 +82,19 @@ class TimeHelper extends AppHelper { private function __translateSpecifier($specifier) { switch ($specifier[1]) { case 'a': - $abday = __c('abday', 5); + $abday = __dc('cake', 'abday', 5); if (is_array($abday)) { return $abday[date('w', $this->__time)]; } break; case 'A': - $day = __c('day', 5); + $day = __dc('cake', 'day', 5); if (is_array($day)) { return $day[date('w', $this->__time)]; } break; case 'c': - $format = __c('d_t_fmt', 5); + $format = __dc('cake', 'd_t_fmt', 5); if ($format != 'd_t_fmt') { return $this->convertSpecifiers($format, $this->__time); } @@ -114,13 +116,13 @@ class TimeHelper extends AppHelper { return date('jS', $this->__time); case 'b': case 'h': - $months = __c('abmon', 5); + $months = __dc('cake', 'abmon', 5); if (is_array($months)) { return $months[date('n', $this->__time) -1]; } return '%b'; case 'B': - $months = __c('mon', 5); + $months = __dc('cake', 'mon', 5); if (is_array($months)) { return $months[date('n', $this->__time) -1]; } @@ -131,14 +133,14 @@ class TimeHelper extends AppHelper { case 'P': $default = array('am' => 0, 'pm' => 1); $meridiem = $default[date('a',$this->__time)]; - $format = __c('am_pm', 5); + $format = __dc('cake', 'am_pm', 5); if (is_array($format)) { $meridiem = $format[$meridiem]; return ($specifier[1] == 'P') ? strtolower($meridiem) : strtoupper($meridiem); } break; case 'r': - $complete = __c('t_fmt_ampm', 5); + $complete = __dc('cake', 't_fmt_ampm', 5); if ($complete != 't_fmt_ampm') { return str_replace('%p',$this->__translateSpecifier(array('%p', 'p')),$complete); } @@ -152,13 +154,13 @@ class TimeHelper extends AppHelper { case 'u': return ($weekDay = date('w', $this->__time)) ? $weekDay : 7; case 'x': - $format = __c('d_fmt', 5); + $format = __dc('cake', 'd_fmt', 5); if ($format != 'd_fmt') { return $this->convertSpecifiers($format, $this->__time); } break; case 'X': - $format = __c('t_fmt', 5); + $format = __dc('cake', 't_fmt', 5); if ($format != 't_fmt') { return $this->convertSpecifiers($format, $this->__time); } @@ -263,9 +265,9 @@ class TimeHelper extends AppHelper { $y = $this->isThisYear($date) ? '' : ' %Y'; if ($this->isToday($dateString, $userOffset)) { - $ret = __('Today, %s', strftime("%H:%M", $date)); + $ret = __d('cake', 'Today, %s', strftime("%H:%M", $date)); } elseif ($this->wasYesterday($dateString, $userOffset)) { - $ret = __('Yesterday, %s', strftime("%H:%M", $date)); + $ret = __d('cake', 'Yesterday, %s', strftime("%H:%M", $date)); } else { $format = $this->convertSpecifiers("%b %eS{$y}, %H:%M", $date); $ret = strftime($format, $date); @@ -612,41 +614,41 @@ class TimeHelper extends AppHelper { $diff = $futureTime - $pastTime; if ($diff > abs($now - $this->fromString($end))) { - $relativeDate = __('on %s', date($format, $inSeconds)); + $relativeDate = __d('cake', 'on %s', date($format, $inSeconds)); } else { if ($years > 0) { // years and months and days - $relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . __n('year', 'years', $years); - $relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months) : ''; - $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks) : ''; - $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : ''; + $relativeDate .= ($relativeDate ? ', ' : '') . $years . ' ' . __dn('cake', 'year', 'years', $years); + $relativeDate .= $months > 0 ? ($relativeDate ? ', ' : '') . $months . ' ' . __dn('cake', 'month', 'months', $months) : ''; + $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __dn('cake', 'week', 'weeks', $weeks) : ''; + $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __dn('cake', 'day', 'days', $days) : ''; } elseif (abs($months) > 0) { // months, weeks and days - $relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . __n('month', 'months', $months); - $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks) : ''; - $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : ''; + $relativeDate .= ($relativeDate ? ', ' : '') . $months . ' ' . __dn('cake', 'month', 'months', $months); + $relativeDate .= $weeks > 0 ? ($relativeDate ? ', ' : '') . $weeks . ' ' . __dn('cake', 'week', 'weeks', $weeks) : ''; + $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __dn('cake', 'day', 'days', $days) : ''; } elseif (abs($weeks) > 0) { // weeks and days - $relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . __n('week', 'weeks', $weeks); - $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days) : ''; + $relativeDate .= ($relativeDate ? ', ' : '') . $weeks . ' ' . __dn('cake', 'week', 'weeks', $weeks); + $relativeDate .= $days > 0 ? ($relativeDate ? ', ' : '') . $days . ' ' . __dn('cake', 'day', 'days', $days) : ''; } elseif (abs($days) > 0) { // days and hours - $relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . __n('day', 'days', $days); - $relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours) : ''; + $relativeDate .= ($relativeDate ? ', ' : '') . $days . ' ' . __dn('cake', 'day', 'days', $days); + $relativeDate .= $hours > 0 ? ($relativeDate ? ', ' : '') . $hours . ' ' . __dn('cake', 'hour', 'hours', $hours) : ''; } elseif (abs($hours) > 0) { // hours and minutes - $relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . __n('hour', 'hours', $hours); - $relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes) : ''; + $relativeDate .= ($relativeDate ? ', ' : '') . $hours . ' ' . __dn('cake', 'hour', 'hours', $hours); + $relativeDate .= $minutes > 0 ? ($relativeDate ? ', ' : '') . $minutes . ' ' . __dn('cake', 'minute', 'minutes', $minutes) : ''; } elseif (abs($minutes) > 0) { // minutes only - $relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . __n('minute', 'minutes', $minutes); + $relativeDate .= ($relativeDate ? ', ' : '') . $minutes . ' ' . __dn('cake', 'minute', 'minutes', $minutes); } else { // seconds only - $relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . __n('second', 'seconds', $seconds); + $relativeDate .= ($relativeDate ? ', ' : '') . $seconds . ' ' . __dn('cake', 'second', 'seconds', $seconds); } if (!$backwards) { - $relativeDate = __('%s ago', $relativeDate); + $relativeDate = __d('cake', '%s ago', $relativeDate); } } return $relativeDate; @@ -666,7 +668,7 @@ class TimeHelper extends AppHelper { public function wasWithinLast($timeInterval, $dateString, $userOffset = null) { $tmp = str_replace(' ', '', $timeInterval); if (is_numeric($tmp)) { - $timeInterval = $tmp . ' ' . __('days'); + $timeInterval = $tmp . ' ' . __d('cake', 'days'); } $date = $this->fromString($dateString, $userOffset); @@ -750,4 +752,4 @@ class TimeHelper extends AppHelper { $format = $this->convertSpecifiers($format, $date); return strftime($format, $date); } -} +} \ No newline at end of file diff --git a/cake/libs/view/helper_collection.php b/lib/Cake/View/HelperCollection.php similarity index 86% rename from cake/libs/view/helper_collection.php rename to lib/Cake/View/HelperCollection.php index 4a6fd5d88..ee291525b 100644 --- a/cake/libs/view/helper_collection.php +++ b/lib/Cake/View/HelperCollection.php @@ -15,6 +15,9 @@ * @since CakePHP(tm) v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ + +App::uses('ObjectCollection', 'Utility'); + class HelperCollection extends ObjectCollection { /** @@ -59,7 +62,7 @@ class HelperCollection extends ObjectCollection { $alias = $helper; $helper = $settings['className']; } - list($plugin, $name) = pluginSplit($helper); + list($plugin, $name) = pluginSplit($helper, true); if (!isset($alias)) { $alias = $name; } @@ -68,19 +71,12 @@ class HelperCollection extends ObjectCollection { return $this->_loaded[$alias]; } $helperClass = $name . 'Helper'; + App::uses($helperClass, $plugin . 'View/Helper'); if (!class_exists($helperClass)) { - if (!App::import('Helper', $helper)) { - throw new MissingHelperFileException(array( - 'class' => $helperClass, - 'file' => Inflector::underscore($name) . '.php' - )); - } - if (!class_exists($helperClass)) { - throw new MissingHelperClassException(array( - 'class' => $helperClass, - 'file' => Inflector::underscore($name) . '.php' - )); - } + throw new MissingHelperClassException(array( + 'class' => $helperClass, + 'file' => $helperClass . '.php' + )); } $this->_loaded[$alias] = new $helperClass($this->_View, $settings); diff --git a/cake/libs/view/media.php b/lib/Cake/View/MediaView.php similarity index 98% rename from cake/libs/view/media.php rename to lib/Cake/View/MediaView.php index a2b9c1cff..70e92979c 100644 --- a/cake/libs/view/media.php +++ b/lib/Cake/View/MediaView.php @@ -16,7 +16,8 @@ * @since CakePHP(tm) v 1.2.0.5714 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View', false); +App::uses('View', 'View'); +App::uses('CakeRequest', 'Network'); /** * Media View provides a custom view implementation for sending files to visitors. Its great @@ -78,7 +79,6 @@ class MediaView extends View { if (is_object($controller) && isset($controller->response)) { $this->response = $controller->response; } else { - App::import('Core', 'CakeRequest'); $this->response = new CakeResponse; } } diff --git a/cake/libs/view/scaffold.php b/lib/Cake/View/ScaffoldView.php similarity index 95% rename from cake/libs/view/scaffold.php rename to lib/Cake/View/ScaffoldView.php index 6f051a211..746e84eea 100644 --- a/cake/libs/view/scaffold.php +++ b/lib/Cake/View/ScaffoldView.php @@ -18,7 +18,7 @@ * @since Cake v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'Theme'); +App::uses('ThemeView', 'View'); /** * ScaffoldView provides specific view file loading features for scaffolded views. @@ -80,7 +80,7 @@ class ScaffoldView extends ThemeView { } if ($name === 'scaffolds' . DS . $subDir . 'error') { - return LIBS . 'view' . DS . 'errors' . DS . 'scaffold_error.ctp'; + return LIBS . 'View' . DS . 'errors' . DS . 'scaffold_error.ctp'; } throw new MissingViewException($paths[0] . $name . $this->ext); diff --git a/cake/libs/view/theme.php b/lib/Cake/View/ThemeView.php similarity index 96% rename from cake/libs/view/theme.php rename to lib/Cake/View/ThemeView.php index 544aacdc3..df85282b7 100644 --- a/cake/libs/view/theme.php +++ b/lib/Cake/View/ThemeView.php @@ -16,7 +16,7 @@ * @since CakePHP(tm) v 0.10.0.1076 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -App::import('View', 'View'); +App::uses('View', 'View'); /** * Theme view class @@ -58,7 +58,7 @@ class ThemeView extends View { $count = count($paths); for ($i = 0; $i < $count; $i++) { if (strpos($paths[$i], DS . 'plugins' . DS) === false - && strpos($paths[$i], DS . 'libs' . DS . 'view') === false) { + && strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) { if ($plugin) { $themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS; } diff --git a/cake/libs/view/view.php b/lib/Cake/View/View.php similarity index 97% rename from cake/libs/view/view.php rename to lib/Cake/View/View.php index 89d5ae5d5..05e3c9a6f 100644 --- a/cake/libs/view/view.php +++ b/lib/Cake/View/View.php @@ -20,8 +20,8 @@ /** * Included libraries. */ -App::import('View', 'HelperCollection', false); -App::import('View', 'Helper', false); +App::uses('HelperCollection', 'View'); +App::uses('Router', 'Routing'); /** * View, the V in the MVC triad. View interacts with Helpers and view variables passed @@ -396,7 +396,7 @@ class View extends Object { $layout = $this->layout; } if ($this->output === false) { - throw new CakeException(__("Error in view %s, got no content.", $viewFileName)); + throw new CakeException(__d('cake_dev', "Error in view %s, got no content.", $viewFileName)); } if ($layout && $this->autoLayout) { $this->output = $this->renderLayout($this->output, $layout); @@ -439,7 +439,7 @@ class View extends Object { $this->output = $this->_render($layoutFileName); if ($this->output === false) { - throw new CakeException(__("Error in layout %s, got no content.", $layoutFileName)); + throw new CakeException(__d('cake_dev', "Error in layout %s, got no content.", $layoutFileName)); } $this->Helpers->trigger('afterLayout', array($layoutFileName)); @@ -687,7 +687,7 @@ class View extends Object { if (strpos($name, DS) === false && $name[0] !== '.') { $name = $this->viewPath . DS . $subDir . Inflector::underscore($name); } elseif (strpos($name, DS) !== false) { - if ($name{0} === DS || $name{1} === ':') { + if ($name[0] === DS || $name[1] === ':') { if (is_file($name)) { return $name; } @@ -799,8 +799,8 @@ class View extends Object { return $this->__paths; } $paths = array(); - $viewPaths = App::path('views'); - $corePaths = array_flip(App::core('views')); + $viewPaths = App::path('View'); + $corePaths = array_flip(App::core('View')); if (!empty($plugin)) { $count = count($viewPaths); @@ -809,9 +809,10 @@ class View extends Object { $paths[] = $viewPaths[$i] . 'plugins' . DS . $plugin . DS; } } - $paths[] = App::pluginPath($plugin) . 'views' . DS; + $paths = array_merge($paths, App::path('View', $plugin)); } - $this->__paths = array_merge($paths, $viewPaths); + + $this->__paths = array_unique(array_merge($paths, $viewPaths, array_keys($corePaths))); return $this->__paths; } } diff --git a/cake/libs/view/elements/email/html/default.ctp b/lib/Cake/View/elements/email/html/default.ctp similarity index 100% rename from cake/libs/view/elements/email/html/default.ctp rename to lib/Cake/View/elements/email/html/default.ctp diff --git a/cake/libs/view/elements/email/text/default.ctp b/lib/Cake/View/elements/email/text/default.ctp similarity index 100% rename from cake/libs/view/elements/email/text/default.ctp rename to lib/Cake/View/elements/email/text/default.ctp diff --git a/cake/libs/view/elements/exception_stack_trace.ctp b/lib/Cake/View/elements/exception_stack_trace.ctp similarity index 100% rename from cake/libs/view/elements/exception_stack_trace.ctp rename to lib/Cake/View/elements/exception_stack_trace.ctp diff --git a/cake/libs/view/elements/sql_dump.ctp b/lib/Cake/View/elements/sql_dump.ctp similarity index 100% rename from cake/libs/view/elements/sql_dump.ctp rename to lib/Cake/View/elements/sql_dump.ctp diff --git a/cake/libs/view/errors/error400.ctp b/lib/Cake/View/errors/error400.ctp similarity index 85% rename from cake/libs/view/errors/error400.ctp rename to lib/Cake/View/errors/error400.ctp index b6487ee91..38e1aedaa 100644 --- a/cake/libs/view/errors/error400.ctp +++ b/lib/Cake/View/errors/error400.ctp @@ -18,13 +18,13 @@ ?>

    - : + : '{$url}'" ); ?>

    - 0 ): echo $this->element('exception_stack_trace'); endif; diff --git a/cake/libs/view/errors/error500.ctp b/lib/Cake/View/errors/error500.ctp similarity index 85% rename from cake/libs/view/errors/error500.ctp rename to lib/Cake/View/errors/error500.ctp index f7b648ff6..247f2db78 100644 --- a/cake/libs/view/errors/error500.ctp +++ b/lib/Cake/View/errors/error500.ctp @@ -18,11 +18,11 @@ ?>

    - : - + : +

    - 0 ): echo $this->element('exception_stack_trace'); endif; -?> +?> \ No newline at end of file diff --git a/lib/Cake/View/errors/missing_action.ctp b/lib/Cake/View/errors/missing_action.ctp new file mode 100644 index 000000000..cac7d2e9b --- /dev/null +++ b/lib/Cake/View/errors/missing_action.ctp @@ -0,0 +1,43 @@ + +

    + : + ' . $action . '', '' . $controller . ''); ?> +

    +

    + : + ' . $controller . '::', '' . $action . '()', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?> +

    +
    +<?php
    +class  extends AppController {
    +
    +
    +	function  {
    +
    +	}
    +
    +}
    +?>
    +
    +

    + : + +

    +element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_behavior_class.ctp b/lib/Cake/View/errors/missing_behavior_class.ctp similarity index 52% rename from cake/libs/view/errors/missing_behavior_class.ctp rename to lib/Cake/View/errors/missing_behavior_class.ctp index e7c454069..3bc4dcb67 100644 --- a/cake/libs/view/errors/missing_behavior_class.ctp +++ b/lib/Cake/View/errors/missing_behavior_class.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - %s can not be found or does not exist.', $class); ?> + : + %s can not be found or does not exist.', $class); ?>

    - : - + : +

     <?php
    @@ -33,8 +33,8 @@ class  extends ModelBehavior {
     ?>
     

    - : - + : +

    -element('exception_stack_trace'); ?> +element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_behavior_file.ctp b/lib/Cake/View/errors/missing_behavior_file.ctp similarity index 50% rename from cake/libs/view/errors/missing_behavior_file.ctp rename to lib/Cake/View/errors/missing_behavior_file.ctp index 09e90b350..aa3e314c2 100644 --- a/cake/libs/view/errors/missing_behavior_file.ctp +++ b/lib/Cake/View/errors/missing_behavior_file.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - + : +

     <?php
    @@ -33,8 +33,8 @@ class  extends ModelBehavior {
     ?>
     

    - : - + : +

    -element('exception_stack_trace'); ?> +element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_component_class.ctp b/lib/Cake/View/errors/missing_component_class.ctp similarity index 51% rename from cake/libs/view/errors/missing_component_class.ctp rename to lib/Cake/View/errors/missing_component_class.ctp index cf06671dc..4465edba2 100644 --- a/cake/libs/view/errors/missing_component_class.ctp +++ b/lib/Cake/View/errors/missing_component_class.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $class . ''); ?> + : + ' . $class . ''); ?>

    - : - ' . $class . '', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?> + : + ' . $class . '', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>

     <?php
    @@ -33,8 +33,8 @@ class  extends Component {
    ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_component_file.ctp b/lib/Cake/View/errors/missing_component_file.ctp similarity index 52% rename from cake/libs/view/errors/missing_component_file.ctp rename to lib/Cake/View/errors/missing_component_file.ctp index 527afc9c3..aeb8c3269 100644 --- a/cake/libs/view/errors/missing_component_file.ctp +++ b/lib/Cake/View/errors/missing_component_file.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - ' . $class . '', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?> + : + ' . $class . '', APP_DIR . DS . 'controllers' . DS . 'components' . DS . $file); ?>

     <?php
    @@ -33,8 +33,8 @@ class  extends Component {
    ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_connection.ctp b/lib/Cake/View/errors/missing_connection.ctp similarity index 51% rename from cake/libs/view/errors/missing_connection.ctp rename to lib/Cake/View/errors/missing_connection.ctp index dfda66e3a..ae4887b8a 100644 --- a/cake/libs/view/errors/missing_connection.ctp +++ b/lib/Cake/View/errors/missing_connection.ctp @@ -16,18 +16,18 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - + : +

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_controller.ctp b/lib/Cake/View/errors/missing_controller.ctp similarity index 51% rename from cake/libs/view/errors/missing_controller.ctp rename to lib/Cake/View/errors/missing_controller.ctp index 7f9e7d27f..b57193943 100644 --- a/cake/libs/view/errors/missing_controller.ctp +++ b/lib/Cake/View/errors/missing_controller.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $controller . ''); ?> + : + ' . $controller . ''); ?>

    - : - ' . $controller . '', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?> + : + ' . $controller . '', APP_DIR . DS . 'controllers' . DS . Inflector::underscore($controller) . '.php'); ?>

     <?php
    @@ -33,8 +33,8 @@ class  extends AppController {
     ?>
     

    - : - + : +

    -element('exception_stack_trace'); ?> +element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_database.ctp b/lib/Cake/View/errors/missing_database.ctp similarity index 51% rename from cake/libs/view/errors/missing_database.ctp rename to lib/Cake/View/errors/missing_database.ctp index 7aa2d5e80..e7764506f 100644 --- a/cake/libs/view/errors/missing_database.ctp +++ b/lib/Cake/View/errors/missing_database.ctp @@ -16,18 +16,18 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - + : +

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_datasource_config.ctp b/lib/Cake/View/errors/missing_datasource_config.ctp similarity index 54% rename from cake/libs/view/errors/missing_datasource_config.ctp rename to lib/Cake/View/errors/missing_datasource_config.ctp index 64c7d4c13..de6503a5a 100644 --- a/cake/libs/view/errors/missing_datasource_config.ctp +++ b/lib/Cake/View/errors/missing_datasource_config.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $config . ''); ?> + : + ' . $config . ''); ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_datasource_file.ctp b/lib/Cake/View/errors/missing_datasource_file.ctp similarity index 56% rename from cake/libs/view/errors/missing_datasource_file.ctp rename to lib/Cake/View/errors/missing_datasource_file.ctp index 0d53072fb..3833504be 100644 --- a/cake/libs/view/errors/missing_datasource_file.ctp +++ b/lib/Cake/View/errors/missing_datasource_file.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $class . ''); ?> + : + ' . $class . ''); ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_helper_class.ctp b/lib/Cake/View/errors/missing_helper_class.ctp similarity index 52% rename from cake/libs/view/errors/missing_helper_class.ctp rename to lib/Cake/View/errors/missing_helper_class.ctp index 842ded905..9117c87d5 100644 --- a/cake/libs/view/errors/missing_helper_class.ctp +++ b/lib/Cake/View/errors/missing_helper_class.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - %s can not be found or does not exist.', $class); ?> + : + %s can not be found or does not exist.', $class); ?>

    - : - + : +

     <?php
    @@ -33,8 +33,8 @@ class  extends AppHelper {
     ?>
     

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_helper_file.ctp b/lib/Cake/View/errors/missing_helper_file.ctp similarity index 51% rename from cake/libs/view/errors/missing_helper_file.ctp rename to lib/Cake/View/errors/missing_helper_file.ctp index 6ba0e9b6f..94f90f1e2 100644 --- a/cake/libs/view/errors/missing_helper_file.ctp +++ b/lib/Cake/View/errors/missing_helper_file.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - + : +

     <?php
    @@ -33,8 +33,8 @@ class  extends AppHelper {
     ?>
     

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_layout.ctp b/lib/Cake/View/errors/missing_layout.ctp similarity index 50% rename from cake/libs/view/errors/missing_layout.ctp rename to lib/Cake/View/errors/missing_layout.ctp index 011e59a64..ed35e35ab 100644 --- a/cake/libs/view/errors/missing_layout.ctp +++ b/lib/Cake/View/errors/missing_layout.ctp @@ -16,18 +16,18 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $file . ''); ?> + : + ' . $file . ''); ?>

    - : - ' . $file . ''); ?> + : + ' . $file . ''); ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/missing_table.ctp b/lib/Cake/View/errors/missing_table.ctp similarity index 55% rename from cake/libs/view/errors/missing_table.ctp rename to lib/Cake/View/errors/missing_table.ctp index 1288dd06a..572579e0c 100644 --- a/cake/libs/view/errors/missing_table.ctp +++ b/lib/Cake/View/errors/missing_table.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $table . '', '' . $class . ''); ?> + : + ' . $table . '', '' . $class . ''); ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/lib/Cake/View/errors/missing_view.ctp b/lib/Cake/View/errors/missing_view.ctp new file mode 100644 index 000000000..1e9727719 --- /dev/null +++ b/lib/Cake/View/errors/missing_view.ctp @@ -0,0 +1,33 @@ + +

    +

    + : + ' . Inflector::camelize($this->request->controller) . 'Controller::', '' . $this->request->action . '()'); ?> +

    +

    + : + +

    +

    + : + +

    + +element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/private_action.ctp b/lib/Cake/View/errors/private_action.ctp similarity index 55% rename from cake/libs/view/errors/private_action.ctp rename to lib/Cake/View/errors/private_action.ctp index 833f42112..e36a784eb 100644 --- a/cake/libs/view/errors/private_action.ctp +++ b/lib/Cake/View/errors/private_action.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - ' . $controller . '::', '' . $action . '()'); ?> + : + ' . $controller . '::', '' . $action . '()'); ?>

    - : - + : +

    element('exception_stack_trace'); ?> \ No newline at end of file diff --git a/cake/libs/view/errors/scaffold_error.ctp b/lib/Cake/View/errors/scaffold_error.ctp similarity index 60% rename from cake/libs/view/errors/scaffold_error.ctp rename to lib/Cake/View/errors/scaffold_error.ctp index 40f09c90a..2df21dcc1 100644 --- a/cake/libs/view/errors/scaffold_error.ctp +++ b/lib/Cake/View/errors/scaffold_error.ctp @@ -16,14 +16,14 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ ?> -

    +

    - : - + : +

    - : - + : +

     <?php
    diff --git a/cake/libs/view/layouts/ajax.ctp b/lib/Cake/View/layouts/ajax.ctp
    similarity index 100%
    rename from cake/libs/view/layouts/ajax.ctp
    rename to lib/Cake/View/layouts/ajax.ctp
    diff --git a/cake/libs/view/layouts/default.ctp b/lib/Cake/View/layouts/default.ctp
    similarity index 81%
    rename from cake/libs/view/layouts/default.ctp
    rename to lib/Cake/View/layouts/default.ctp
    index 5575c7329..944b2f48c 100644
    --- a/cake/libs/view/layouts/default.ctp
    +++ b/lib/Cake/View/layouts/default.ctp
    @@ -15,13 +15,15 @@
      * @since         CakePHP(tm) v 0.10.0.1076
      * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
      */
    +
    +$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
     ?>
     
     
     
     	Html->charset(); ?>
     	
    -		<?php echo __('CakePHP: the rapid development php framework:'); ?>
    +		<?php echo $cakeDescription ?>:
     		<?php echo $title_for_layout; ?>
     	
     	
     	
    @@ -46,7 +48,7 @@
    -

    +

      request->action != 'add'): ?>
    • Form->postLink( - __('Delete'), + __d('cake', 'Delete'), array('action' => 'delete', $this->Form->value($modelClass . '.' . $primaryKey)), null, - __('Are you sure you want to delete # %s?', $this->Form->value($modelClass . '.' . $primaryKey))); + __d('cake', 'Are you sure you want to delete # %s?', $this->Form->value($modelClass . '.' . $primaryKey))); ?>
    • -
    • Html->link(__('List') . ' ' . $pluralHumanName, array('action' => 'index'));?>
    • +
    • Html->link(__d('cake', 'List') . ' ' . $pluralHumanName, array('action' => 'index'));?>
    • $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { - echo "\t\t
    • " . $this->Html->link(__('List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "
    • \n"; - echo "\t\t
    • " . $this->Html->link(__('New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "
    • \n"; + echo "\t\t
    • " . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' =>'index')) . "
    • \n"; + echo "\t\t
    • " . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' =>'add')) . "
    • \n"; $done[] = $_details['controller']; } } diff --git a/cake/libs/view/scaffolds/index.ctp b/lib/Cake/View/scaffolds/index.ctp similarity index 63% rename from cake/libs/view/scaffolds/index.ctp rename to lib/Cake/View/scaffolds/index.ctp index c3da1d4d8..d0def968e 100644 --- a/cake/libs/view/scaffolds/index.ctp +++ b/lib/Cake/View/scaffolds/index.ctp @@ -23,7 +23,7 @@ Paginator->sort($_field);?> - + '; - echo $this->Html->link(__('View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])); - echo $this->Html->link(__('Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])); + echo $this->Html->link(__d('cake', 'View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])); + echo $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])); echo $this->Form->postLink( - __('Delete'), + __d('cake', 'Delete'), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, - __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] + __d('cake', 'Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] ); echo ''; echo ''; @@ -67,26 +67,26 @@ endforeach;

      Paginator->counter(array( - 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%') + 'format' => __d('cake', 'Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%') )); ?>

      - Paginator->prev('<< ' . __('previous'), array(), null, array('class' => 'disabled')); ?> + Paginator->prev('<< ' . __d('cake', 'previous'), array(), null, array('class' => 'disabled')); ?> | Paginator->numbers(); ?> - Paginator->next(__('next') .' >>', array(), null, array('class' => 'disabled')); ?> + Paginator->next(__d('cake', 'next') .' >>', array(), null, array('class' => 'disabled')); ?>
    -

    +

      -
    • Html->link(__('New %s', $singularHumanName), array('action' => 'add')); ?>
    • +
    • Html->link(__d('cake', 'New %s', $singularHumanName), array('action' => 'add')); ?>
    • $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { - echo "
    • " . $this->Html->link(__('List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "
    • "; - echo "
    • " . $this->Html->link(__('New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "
    • "; + echo "
    • " . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "
    • "; + echo "
    • " . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "
    • "; $done[] = $_details['controller']; } } diff --git a/cake/libs/view/scaffolds/view.ctp b/lib/Cake/View/scaffolds/view.ctp similarity index 60% rename from cake/libs/view/scaffolds/view.ctp rename to lib/Cake/View/scaffolds/view.ctp index 010450a15..ef2fe7006 100644 --- a/cake/libs/view/scaffolds/view.ctp +++ b/lib/Cake/View/scaffolds/view.ctp @@ -17,7 +17,7 @@ */ ?>
      -

      +

      -

      +

        " .$this->Html->link(__('Edit %s', $singularHumanName), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])). " \n"; - echo "\t\t
      • " .$this->Html->link(__('Delete %s', $singularHumanName), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] . '?'). "
      • \n"; - echo "\t\t
      • " .$this->Html->link(__('List %s', $pluralHumanName), array('action' => 'index')). "
      • \n"; - echo "\t\t
      • " .$this->Html->link(__('New %s', $singularHumanName), array('action' => 'add')). "
      • \n"; + echo "\t\t
      • " .$this->Html->link(__d('cake', 'Edit %s', $singularHumanName), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])). "
      • \n"; + echo "\t\t
      • " .$this->Html->link(__d('cake', 'Delete %s', $singularHumanName), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __d('cake', 'Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] . '?'). "
      • \n"; + echo "\t\t
      • " .$this->Html->link(__d('cake', 'List %s', $pluralHumanName), array('action' => 'index')). "
      • \n"; + echo "\t\t
      • " .$this->Html->link(__d('cake', 'New %s', $singularHumanName), array('action' => 'add')). "
      • \n"; $done = array(); foreach ($associations as $_type => $_data) { foreach ($_data as $_alias => $_details) { if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) { - echo "\t\t
      • " . $this->Html->link(__('List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "
      • \n"; - echo "\t\t
      • " . $this->Html->link(__('New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "
      • \n"; + echo "\t\t
      • " . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "
      • \n"; + echo "\t\t
      • " . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "
      • \n"; $done[] = $_details['controller']; } } @@ -71,7 +71,7 @@ foreach ($scaffoldFields as $_field) { if (!empty($associations['hasOne'])) : foreach ($associations['hasOne'] as $_alias => $_details): ?> @@ -110,7 +110,7 @@ foreach ($relations as $_alias => $_details): $otherSingularVar = Inflector::variable($_alias); ?>