Skip to content
Permalink
Browse files

Changed all public methods to specify public access.

  • Loading branch information...
predominant committed Apr 5, 2010
1 parent 14b6a7a commit 1497ec391084b33d29be42437cf4d7893d33704f
Showing with 1,278 additions and 2,551 deletions.
  1. +9 −18 cake/console/cake.php
  2. +17 −34 cake/console/error.php
  3. +15 −30 cake/console/libs/acl.php
  4. +3 −6 cake/console/libs/api.php
  5. +4 −8 cake/console/libs/bake.php
  6. +3 −6 cake/console/libs/console.php
  7. +4 −8 cake/console/libs/i18n.php
  8. +7 −14 cake/console/libs/schema.php
  9. +11 −22 cake/console/libs/shell.php
  10. +1 −2 cake/console/libs/tasks/bake.php
  11. +5 −10 cake/console/libs/tasks/controller.php
  12. +3 −6 cake/console/libs/tasks/db_config.php
  13. +1 −2 cake/console/libs/tasks/extract.php
  14. +6 −12 cake/console/libs/tasks/fixture.php
  15. +7 −14 cake/console/libs/tasks/model.php
  16. +1 −2 cake/console/libs/tasks/plugin.php
  17. +9 −17 cake/console/libs/tasks/project.php
  18. +15 −30 cake/console/libs/tasks/test.php
  19. +6 −12 cake/console/libs/tasks/view.php
  20. +4 −8 cake/console/libs/testsuite.php
  21. +7 −14 cake/dispatcher.php
  22. +12 −24 cake/libs/cache.php
  23. +7 −14 cake/libs/cache/apc.php
  24. +6 −12 cake/libs/cache/file.php
  25. +8 −16 cake/libs/cache/memcache.php
  26. +7 −14 cake/libs/cache/xcache.php
  27. +13 −26 cake/libs/cake_session.php
  28. +11 −22 cake/libs/cake_socket.php
  29. +1 −2 cake/libs/class_registry.php
  30. +13 −26 cake/libs/configure.php
  31. +3 −6 cake/libs/controller/component.php
  32. +20 −40 cake/libs/controller/components/acl.php
  33. +17 −34 cake/libs/controller/components/auth.php
  34. +6 −12 cake/libs/controller/components/cookie.php
  35. +4 −8 cake/libs/controller/components/email.php
  36. +21 −42 cake/libs/controller/components/request_handler.php
  37. +12 −24 cake/libs/controller/components/security.php
  38. +12 −24 cake/libs/controller/components/session.php
  39. +7 −14 cake/libs/controller/controller.php
  40. +1 −2 cake/libs/controller/pages_controller.php
  41. +1 −2 cake/libs/debugger.php
  42. +18 −36 cake/libs/error.php
  43. +27 −54 cake/libs/file.php
  44. +16 −32 cake/libs/folder.php
  45. +8 −16 cake/libs/http_socket.php
  46. +2 −4 cake/libs/i18n.php
  47. +1 −2 cake/libs/inflector.php
  48. +3 −6 cake/libs/l10n.php
  49. +8 −16 cake/libs/magic_db.php
  50. +4 −8 cake/libs/model/behaviors/acl.php
  51. +8 −16 cake/libs/model/behaviors/containable.php
  52. +8 −16 cake/libs/model/behaviors/translate.php
  53. +14 −28 cake/libs/model/behaviors/tree.php
  54. +8 −16 cake/libs/model/cake_schema.php
  55. +19 −38 cake/libs/model/datasources/datasource.php
  56. +16 −32 cake/libs/model/datasources/dbo/dbo_oracle.php
  57. +1 −2 cake/libs/model/datasources/dbo/dbo_postgres.php
  58. +1 −2 cake/libs/model/datasources/dbo/dbo_sqlite.php
  59. +53 −106 cake/libs/model/datasources/dbo_source.php
  60. +1 −2 cake/libs/model/db_acl.php
  61. +27 −54 cake/libs/model/model.php
  62. +18 −36 cake/libs/model/model_behavior.php
  63. +6 −12 cake/libs/object.php
  64. +2 −4 cake/libs/overloadable_php4.php
  65. +2 −4 cake/libs/overloadable_php5.php
  66. +6 −12 cake/libs/router.php
  67. +1 −2 cake/libs/sanitize.php
  68. +27 −54 cake/libs/validation.php
  69. +15 −30 cake/libs/view/helper.php
  70. +1 −2 cake/libs/view/helpers/ajax.php
  71. +23 −46 cake/libs/view/helpers/form.php
  72. +19 −38 cake/libs/view/helpers/html.php
  73. +1 −2 cake/libs/view/helpers/javascript.php
  74. +5 −10 cake/libs/view/helpers/jquery_engine.php
  75. +27 −54 cake/libs/view/helpers/js.php
  76. +6 −12 cake/libs/view/helpers/number.php
  77. +19 −38 cake/libs/view/helpers/paginator.php
  78. +3 −6 cake/libs/view/helpers/prototype_engine.php
  79. +4 −8 cake/libs/view/helpers/rss.php
  80. +7 −14 cake/libs/view/helpers/session.php
  81. +8 −16 cake/libs/view/helpers/text.php
  82. +23 −46 cake/libs/view/helpers/time.php
  83. +5 −10 cake/libs/view/helpers/xml.php
  84. +11 −22 cake/libs/view/view.php
  85. +26 −52 cake/libs/xml.php
  86. +26 −52 cake/tests/cases/basics.test.php
  87. +16 −32 cake/tests/cases/console/cake.test.php
  88. +15 −30 cake/tests/cases/console/libs/acl.test.php
  89. +3 −6 cake/tests/cases/console/libs/api.test.php
  90. +3 −6 cake/tests/cases/console/libs/bake.test.php
  91. +16 −32 cake/tests/cases/console/libs/schema.test.php
  92. +14 −28 cake/tests/cases/console/libs/shell.test.php
  93. +19 −38 cake/tests/cases/console/libs/tasks/controller.test.php
  94. +5 −10 cake/tests/cases/console/libs/tasks/db_config.test.php
  95. +3 −6 cake/tests/cases/console/libs/tasks/extract.test.php
  96. +14 −28 cake/tests/cases/console/libs/tasks/fixture.test.php
  97. +28 −56 cake/tests/cases/console/libs/tasks/model.test.php
  98. +8 −16 cake/tests/cases/console/libs/tasks/plugin.test.php
  99. +12 −23 cake/tests/cases/console/libs/tasks/project.test.php
  100. +7 −14 cake/tests/cases/console/libs/tasks/template.test.php
  101. +20 −40 cake/tests/cases/console/libs/tasks/test.test.php
  102. +26 −52 cake/tests/cases/console/libs/tasks/view.test.php
  103. +54 −108 cake/tests/cases/dispatcher.test.php
  104. +2 −4 cake/tests/cases/libs/cake_test_case.test.php
  105. +7 −11 cake/tests/cases/libs/code_coverage_manager.test.php
  106. +3 −6 cake/tests/cases/libs/controller/component.test.php
  107. +3 −6 cake/tests/cases/libs/controller/components/email.test.php
  108. +1 −2 cake/tests/cases/libs/controller/components/request_handler.test.php
  109. +1 −2 cake/tests/cases/libs/controller/components/security.test.php
  110. +2 −4 cake/tests/cases/libs/controller/components/session.test.php
  111. +2 −4 cake/tests/cases/libs/controller/controller.test.php
  112. +1 −2 cake/tests/cases/libs/folder.test.php
  113. +1 −2 cake/tests/cases/libs/inflector.test.php
  114. +6 −12 cake/tests/cases/libs/magic_db.test.php
  115. +9 −18 cake/tests/cases/libs/model/behaviors/acl.test.php
  116. +6 −12 cake/tests/cases/libs/model/behaviors/containable.test.php
  117. +10 −20 cake/tests/cases/libs/model/behaviors/tree.test.php
  118. +10 −20 cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php
  119. +6 −12 cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
  120. +6 −12 cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php
  121. +6 −12 cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php
  122. +6 −12 cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php
  123. +1 −2 cake/tests/cases/libs/model/datasources/dbo_source.test.php
  124. +1 −2 cake/tests/cases/libs/model/model_behavior.test.php
  125. +2 −4 cake/tests/cases/libs/model/model_read.test.php
  126. +2 −4 cake/tests/cases/libs/model/model_write.test.php
  127. +4 −8 cake/tests/cases/libs/router.test.php
  128. +8 −16 cake/tests/cases/libs/test_manager.test.php
  129. +3 −6 cake/tests/cases/libs/validation.test.php
  130. +1 −2 cake/tests/cases/libs/view/helpers/cache.test.php
  131. +1 −2 cake/tests/cases/libs/xml.test.php
  132. +16 −32 cake/tests/lib/cake_test_case.php
  133. +5 −10 cake/tests/lib/cake_test_fixture.php
  134. +3 −6 cake/tests/lib/code_coverage_manager.php
  135. +1 −2 cake/tests/lib/reporter/cake_base_reporter.php
  136. +3 −6 cake/tests/lib/reporter/cake_cli_reporter.php
  137. +9 −18 cake/tests/lib/reporter/cake_html_reporter.php
  138. +7 −14 cake/tests/lib/reporter/cake_text_reporter.php
  139. +6 −12 cake/tests/lib/test_manager.php
@@ -127,9 +127,8 @@ class ShellDispatcher {
*
* @param array $args the argv
* @return void
* @access public
*/
function ShellDispatcher($args = array()) {
public function ShellDispatcher($args = array()) {
set_time_limit(0);
$this->__initConstants();
@@ -281,9 +280,8 @@ function __bootstrap() {
* Clear the console
*
* @return void
* @access public
*/
function clear() {
public function clear() {
if (empty($this->params['noclear'])) {
if ( DS === '/') {
passthru('clear');
@@ -297,9 +295,8 @@ function clear() {
* Dispatches a CLI request
*
* @return boolean
* @access public
*/
function dispatch() {
public function dispatch() {
$arg = $this->shiftArgs();
if (!$arg) {
@@ -429,9 +426,8 @@ function _getShell($plugin = null) {
* @param mixed $options Array or string of options.
* @param string $default Default input value.
* @return Either the default value, or the user-provided input.
* @access public
*/
function getInput($prompt, $options = null, $default = null) {
public function getInput($prompt, $options = null, $default = null) {
if (!is_array($options)) {
$printOptions = '';
} else {
@@ -462,9 +458,8 @@ function getInput($prompt, $options = null, $default = null) {
* @param string $string String to output.
* @param boolean $newline If true, the outputs gets an added newline.
* @return integer Returns the number of bytes output to stdout.
* @access public
*/
function stdout($string, $newline = true) {
public function stdout($string, $newline = true) {
if ($newline) {
return fwrite($this->stdout, $string . "\n");
} else {
@@ -476,19 +471,17 @@ function stdout($string, $newline = true) {
* Outputs to the stderr filehandle.
*
* @param string $string Error text to output.
* @access public
*/
function stderr($string) {
public function stderr($string) {
fwrite($this->stderr, $string);
}
/**
* Parses command line options
*
* @param array $params Parameters to parse
* @access public
*/
function parseParams($params) {
public function parseParams($params) {
$this->__parseParams($params);
$defaults = array('app' => 'app', 'root' => dirname(dirname(dirname(__FILE__))), 'working' => null, 'webroot' => 'webroot');
$params = array_merge($defaults, array_intersect_key($this->params, $defaults));
@@ -562,18 +555,16 @@ function __parseParams($params) {
* Removes first argument and shifts other arguments up
*
* @return mixed Null if there are no arguments otherwise the shifted argument
* @access public
*/
function shiftArgs() {
public function shiftArgs() {
return array_shift($this->args);
}
/**
* Shows console help
*
* @access public
*/
function help() {
public function help() {
$this->clear();
$this->stdout("\nWelcome to CakePHP v" . Configure::version() . " Console");
$this->stdout("---------------------------------------------------------------");
@@ -58,9 +58,8 @@ function __construct($method, $messages) {
* Displays an error page (e.g. 404 Not found).
*
* @param array $params Parameters (code, name, and message)
* @access public
*/
function error($params) {
public function error($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr($code . $name . $message."\n");
$this->_stop();
@@ -70,9 +69,8 @@ function error($params) {
* Convenience method to display a 404 page.
*
* @param array $params Parameters (url, message)
* @access public
*/
function error404($params) {
public function error404($params) {
extract($params, EXTR_OVERWRITE);
$this->error(array(
'code' => '404',
@@ -86,9 +84,8 @@ function error404($params) {
* Renders the Missing Controller web page.
*
* @param array $params Parameters (className)
* @access public
*/
function missingController($params) {
public function missingController($params) {
extract($params, EXTR_OVERWRITE);
$controllerName = str_replace('Controller', '', $className);
$this->stderr(sprintf(__("Missing Controller '%s'", true), $controllerName));
@@ -99,9 +96,8 @@ function missingController($params) {
* Renders the Missing Action web page.
*
* @param array $params Parameters (action, className)
* @access public
*/
function missingAction($params) {
public function missingAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Method '%s' in '%s'", true), $action, $className));
$this->_stop();
@@ -111,9 +107,8 @@ function missingAction($params) {
* Renders the Private Action web page.
*
* @param array $params Parameters (action, className)
* @access public
*/
function privateAction($params) {
public function privateAction($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Trying to access private method '%s' in '%s'", true), $action, $className));
$this->_stop();
@@ -123,9 +118,8 @@ function privateAction($params) {
* Renders the Missing Table web page.
*
* @param array $params Parameters (table, className)
* @access public
*/
function missingTable($params) {
public function missingTable($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing database table '%s' for model '%s'", true), $table, $className));
$this->_stop();
@@ -135,9 +129,8 @@ function missingTable($params) {
* Renders the Missing Database web page.
*
* @param array $params Parameters
* @access public
*/
function missingDatabase($params = array()) {
public function missingDatabase($params = array()) {
$this->stderr(__("Missing Database", true));
$this->_stop();
}
@@ -146,9 +139,8 @@ function missingDatabase($params = array()) {
* Renders the Missing View web page.
*
* @param array $params Parameters (file, action, className)
* @access public
*/
function missingView($params) {
public function missingView($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing View '%s' for '%s' in '%s'", true), $file, $action, $className));
$this->_stop();
@@ -158,9 +150,8 @@ function missingView($params) {
* Renders the Missing Layout web page.
*
* @param array $params Parameters (file)
* @access public
*/
function missingLayout($params) {
public function missingLayout($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Layout '%s'", true), $file));
$this->_stop();
@@ -170,9 +161,8 @@ function missingLayout($params) {
* Renders the Database Connection web page.
*
* @param array $params Parameters
* @access public
*/
function missingConnection($params) {
public function missingConnection($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(__("Missing Database Connection. Try 'cake bake'", true));
$this->_stop();
@@ -182,9 +172,8 @@ function missingConnection($params) {
* Renders the Missing Helper file web page.
*
* @param array $params Parameters (file, helper)
* @access public
*/
function missingHelperFile($params) {
public function missingHelperFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper file '%s' for '%s'", true), $file, Inflector::camelize($helper)));
$this->_stop();
@@ -194,9 +183,8 @@ function missingHelperFile($params) {
* Renders the Missing Helper class web page.
*
* @param array $params Parameters (file, helper)
* @access public
*/
function missingHelperClass($params) {
public function missingHelperClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Helper class '%s' in '%s'", true), Inflector::camelize($helper), $file));
$this->_stop();
@@ -206,9 +194,8 @@ function missingHelperClass($params) {
* Renders the Missing Component file web page.
*
* @param array $params Parameters (file, component)
* @access public
*/
function missingComponentFile($params) {
public function missingComponentFile($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component file '%s' for '%s'", true), $file, Inflector::camelize($component)));
$this->_stop();
@@ -218,9 +205,8 @@ function missingComponentFile($params) {
* Renders the Missing Component class web page.
*
* @param array $params Parameters (file, component)
* @access public
*/
function missingComponentClass($params) {
public function missingComponentClass($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing Component class '%s' in '%s'", true), Inflector::camelize($component), $file));
$this->_stop();
@@ -230,9 +216,8 @@ function missingComponentClass($params) {
* Renders the Missing Model class web page.
*
* @param array $params Parameters (className)
* @access public
*/
function missingModel($params) {
public function missingModel($params) {
extract($params, EXTR_OVERWRITE);
$this->stderr(sprintf(__("Missing model '%s'", true), $className));
$this->_stop();
@@ -243,9 +228,8 @@ function missingModel($params) {
*
* @param string $string String to output.
* @param boolean $newline If true, the outputs gets an added newline.
* @access public
*/
function stdout($string, $newline = true) {
public function stdout($string, $newline = true) {
if ($newline) {
fwrite($this->stdout, $string . "\n");
} else {
@@ -257,9 +241,8 @@ function stdout($string, $newline = true) {
* Outputs to the stderr filehandle.
*
* @param string $string Error text to output.
* @access public
*/
function stderr($string) {
public function stderr($string) {
fwrite($this->stderr, "Error: ". $string . "\n");
}
}
Oops, something went wrong.

0 comments on commit 1497ec3

Please sign in to comment.
You can’t perform that action at this time.