Skip to content

Commit

Permalink
Updating doc blocks and @Package strings for Console
Browse files Browse the repository at this point in the history
classes.
  • Loading branch information
markstory committed Jul 26, 2011
1 parent f534ea0 commit 74e2cb1
Show file tree
Hide file tree
Showing 31 changed files with 142 additions and 198 deletions.
5 changes: 2 additions & 3 deletions lib/Cake/Console/AppShell.php
Expand Up @@ -12,19 +12,18 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* This is a placeholder class.
* Create the same file in app/console/shells/AppShell.php
* Create the same file in app/Console/Command/AppShell.php
*
* Add your application-wide methods in the class below, your shells
* will inherit them.
*
* @package cake.console.libs
* @package Cake.Console
*/
class AppShell extends Shell {

Expand Down
9 changes: 1 addition & 8 deletions lib/Cake/Console/Command/AclShell.php
Expand Up @@ -12,7 +12,6 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5012
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
Expand All @@ -24,39 +23,35 @@
* Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode
* being enabled. Be sure to turn it off when using this shell.
*
* @package cake.console.libs
* @package Cake.Console.Command
*/
class AclShell extends Shell {

/**
* Contains instance of AclComponent
*
* @var AclComponent
* @access public
*/
public $Acl;

/**
* Contains arguments parsed from the command line.
*
* @var array
* @access public
*/
public $args;

/**
* Contains database source to use
*
* @var string
* @access public
*/
public $connection = 'default';

/**
* Contains tasks to load and instantiate
*
* @var array
* @access public
*/
public $tasks = array('DbConfig');

Expand Down Expand Up @@ -556,7 +551,6 @@ function _getNodeId($class, $identifier) {
* get params for standard Acl methods
*
* @return array aro, aco, action
* @access private
*/
function __getParams() {
$aro = is_numeric($this->args[0]) ? intval($this->args[0]) : $this->args[0];
Expand Down Expand Up @@ -585,7 +579,6 @@ function __getParams() {
*
* @param string $type Node type (ARO/ACO)
* @return array Variables
* @access private
*/
function __dataVars($type = null) {
if ($type == null) {
Expand Down
7 changes: 2 additions & 5 deletions lib/Cake/Console/Command/ApiShell.php
Expand Up @@ -14,7 +14,6 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5012
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
Expand All @@ -23,15 +22,14 @@
/**
* API shell to show method signatures of CakePHP core classes.
*
* @package cake.console.libs
* @package Cake.Console.Command
*/
class ApiShell extends Shell {

/**
* Map between short name for paths and real paths.
*
* @var array
* @access public
*/
public $paths = array();

Expand Down Expand Up @@ -192,9 +190,8 @@ public function help() {
* @param object $File File object
* @param string $class Class name
* @return array Methods and signatures indexed by method name
* @access private
*/
function __parseClass($path, $class) {
private function __parseClass($path, $class) {
$parsed = array();

if (!class_exists($class)) {
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/Console/Command/BakeShell.php
Expand Up @@ -16,7 +16,6 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5012
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
Expand All @@ -26,7 +25,7 @@
/**
* Bake is a command-line code generation utility for automating programmer chores.
*
* @package cake.console.libs
* @package Cake.Console.Command
* @link http://book.cakephp.org/view/1522/Code-Generation-with-Bake
*/
class BakeShell extends Shell {
Expand All @@ -35,7 +34,6 @@ class BakeShell extends Shell {
* Contains tasks to load and instantiate
*
* @var array
* @access public
*/
public $tasks = array('Project', 'DbConfig', 'Model', 'Controller', 'View', 'Plugin', 'Fixture', 'Test');

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/CommandListShell.php
Expand Up @@ -21,7 +21,7 @@
/**
* Shows a list of commands available from the console.
*
* @package cake.console.shells
* @package Cake.Console.Command
*/
class CommandListShell extends Shell {

Expand Down
8 changes: 3 additions & 5 deletions lib/Cake/Console/Command/ConsoleShell.php
Expand Up @@ -12,37 +12,35 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5012
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* @package cake.console.shells
* Provides a very basic 'interactive' console for CakePHP apps.
*
* @package Cake.Console.Command
*/
class ConsoleShell extends Shell {

/**
* Available binding types
*
* @var array
* @access public
*/
public $associations = array('hasOne', 'hasMany', 'belongsTo', 'hasAndBelongsToMany');

/**
* Chars that describe invalid commands
*
* @var array
* @access public
*/
public $badCommandChars = array('$', ';');

/**
* Available models
*
* @var array
* @access public
*/
public $models = array();

Expand Down
5 changes: 1 addition & 4 deletions lib/Cake/Console/Command/I18nShell.php
Expand Up @@ -12,31 +12,28 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5669
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* Shell for I18N management.
*
* @package cake.console.shells
* @package Cake.Console.Command
*/
class I18nShell extends Shell {

/**
* Contains database source to use
*
* @var string
* @access public
*/
public $dataSource = 'default';

/**
* Contains tasks to load and instantiate
*
* @var array
* @access public
*/
public $tasks = array('DbConfig', 'Extract');

Expand Down
7 changes: 1 addition & 6 deletions lib/Cake/Console/Command/SchemaShell.php
Expand Up @@ -15,7 +15,6 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells
* @since CakePHP(tm) v 1.2.0.5550
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
Expand All @@ -26,7 +25,7 @@
/**
* Schema is a command-line database management utility for automating programmer chores.
*
* @package cake.console.shells
* @package Cake.Console.Command
* @link http://book.cakephp.org/view/1523/Schema-management-and-migrations
*/
class SchemaShell extends Shell {
Expand All @@ -35,7 +34,6 @@ class SchemaShell extends Shell {
* is this a dry run?
*
* @var boolean
* @access private
*/
private $__dry = null;

Expand Down Expand Up @@ -302,7 +300,6 @@ function _loadSchema() {
* Create database from Schema object
* Should be called via the run method
*
* @access private
*/
function __create($Schema, $table = null) {
$db = ConnectionManager::getDataSource($this->Schema->connection);
Expand Down Expand Up @@ -345,7 +342,6 @@ function __create($Schema, $table = null) {
* Update database with Schema object
* Should be called via the run method
*
* @access private
*/
function __update(&$Schema, $table = null) {
$db = ConnectionManager::getDataSource($this->Schema->connection);
Expand Down Expand Up @@ -387,7 +383,6 @@ function __update(&$Schema, $table = null) {
/**
* Runs sql from __create() or __update()
*
* @access private
*/
function __run($contents, $event, &$Schema) {
if (empty($contents)) {
Expand Down
6 changes: 5 additions & 1 deletion lib/Cake/Console/Command/Task/BakeTask.php
Expand Up @@ -12,10 +12,14 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells.tasks
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
/**
* Base class for Bake Tasks.
*
* @package Cake.Console.Command.Task
*/
class BakeTask extends Shell {

/**
Expand Down
6 changes: 1 addition & 5 deletions lib/Cake/Console/Command/Task/ControllerTask.php
Expand Up @@ -12,7 +12,6 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells.tasks
* @since CakePHP(tm) v 1.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
Expand All @@ -23,23 +22,21 @@
/**
* Task class for creating and updating controller files.
*
* @package cake.console.shells.tasks
* @package Cake.Console.Command.Task
*/
class ControllerTask extends BakeTask {

/**
* Tasks to be loaded by this Task
*
* @var array
* @access public
*/
public $tasks = array('Model', 'Test', 'Template', 'DbConfig', 'Project');

/**
* path to Controller directory
*
* @var array
* @access public
*/
public $path = null;

Expand Down Expand Up @@ -265,7 +262,6 @@ protected function _askAboutMethods() {
* @param string $admin Admin route to use
* @param boolean $wannaUseSession Set to true to use sessions, false otherwise
* @return string Baked actions
* @access private
*/
public function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$currentModelName = $modelImport = $this->_modelName($controllerName);
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Console/Command/Task/DbConfigTask.php
Expand Up @@ -12,15 +12,14 @@
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake.console.shells.tasks
* @since CakePHP(tm) v 1.2
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* Task class for creating and updating the database configuration file.
*
* @package cake.console.shells.tasks
* @package Cake.Console.Command.Task
*/
class DbConfigTask extends Shell {

Expand Down

0 comments on commit 74e2cb1

Please sign in to comment.