Changing protected methods to specify protected access.

This commit is contained in:
predominant 2010-04-05 13:21:28 +10:00
parent 1497ec3910
commit 50a547167b
49 changed files with 145 additions and 290 deletions

View file

@ -166,9 +166,8 @@ class ShellDispatcher {
/** /**
* Defines current working environment. * Defines current working environment.
* *
* @access protected
*/ */
function _initEnvironment() { protected function _initEnvironment() {
$this->stdin = fopen('php://stdin', 'r'); $this->stdin = fopen('php://stdin', 'r');
$this->stdout = fopen('php://stdout', 'w'); $this->stdout = fopen('php://stdout', 'w');
$this->stderr = fopen('php://stderr', 'w'); $this->stderr = fopen('php://stderr', 'w');
@ -389,9 +388,8 @@ class ShellDispatcher {
* *
* @param string $plugin Optionally the name of a plugin * @param string $plugin Optionally the name of a plugin
* @return mixed False if no shell could be found or an object on success * @return mixed False if no shell could be found or an object on success
* @access protected
*/ */
function _getShell($plugin = null) { protected function _getShell($plugin = null) {
foreach ($this->shellPaths as $path) { foreach ($this->shellPaths as $path) {
$this->shellPath = $path . $this->shell . '.php'; $this->shellPath = $path . $this->shell . '.php';
$pluginShellPath = DS . $plugin . DS . 'vendors' . DS . 'shells' . DS; $pluginShellPath = DS . $plugin . DS . 'vendors' . DS . 'shells' . DS;
@ -641,9 +639,8 @@ class ShellDispatcher {
* *
* @param $status see http://php.net/exit for values * @param $status see http://php.net/exit for values
* @return void * @return void
* @access protected
*/ */
function _stop($status = 0) { protected function _stop($status = 0) {
exit($status); exit($status);
} }
} }

View file

@ -229,9 +229,8 @@ class AclShell extends Shell {
* @param array $node Array of node information. * @param array $node Array of node information.
* @param integer $indent indent level. * @param integer $indent indent level.
* @return void * @return void
* @access protected
*/ */
function _outputNode($class, $node, $indent) { protected function _outputNode($class, $node, $indent) {
$indent = str_repeat(' ', $indent); $indent = str_repeat(' ', $indent);
$data = $node[$class]; $data = $node[$class];
if ($data['alias']) { if ($data['alias']) {

View file

@ -323,9 +323,8 @@ class ConsoleShell extends Shell {
* *
* @param string $modelToCheck * @param string $modelToCheck
* @return boolean true if is an available model, false otherwise * @return boolean true if is an available model, false otherwise
* @access protected
*/ */
function _isValidModel($modelToCheck) { protected function _isValidModel($modelToCheck) {
return in_array($modelToCheck, $this->models); return in_array($modelToCheck, $this->models);
} }
@ -334,9 +333,8 @@ class ConsoleShell extends Shell {
* all routes found * all routes found
* *
* @return boolean True if config reload was a success, otherwise false * @return boolean True if config reload was a success, otherwise false
* @access protected
*/ */
function _loadRoutes() { protected function _loadRoutes() {
$router =& Router::getInstance(); $router =& Router::getInstance();
$router->reload(); $router->reload();

View file

@ -192,9 +192,8 @@ class Shell extends Object {
/** /**
* Displays a header for the shell * Displays a header for the shell
* *
* @access protected
*/ */
function _welcome() { protected function _welcome() {
$this->Dispatch->clear(); $this->Dispatch->clear();
$this->out(); $this->out();
$this->out('Welcome to CakePHP v' . Configure::version() . ' Console'); $this->out('Welcome to CakePHP v' . Configure::version() . ' Console');
@ -209,9 +208,8 @@ class Shell extends Object {
* makes $this->DbConfig available to subclasses * makes $this->DbConfig available to subclasses
* *
* @return bool * @return bool
* @access protected
*/ */
function _loadDbConfig() { protected function _loadDbConfig() {
if (config('database') && class_exists('DATABASE_CONFIG')) { if (config('database') && class_exists('DATABASE_CONFIG')) {
$this->DbConfig =& new DATABASE_CONFIG(); $this->DbConfig =& new DATABASE_CONFIG();
return true; return true;
@ -228,9 +226,8 @@ class Shell extends Object {
* if public $uses is an array of models will load those models * if public $uses is an array of models will load those models
* *
* @return bool * @return bool
* @access protected
*/ */
function _loadModels() { protected function _loadModels() {
if ($this->uses === null || $this->uses === false) { if ($this->uses === null || $this->uses === false) {
return; return;
} }
@ -424,9 +421,8 @@ class Shell extends Object {
* *
* @param integer $expectedNum Expected number of paramters * @param integer $expectedNum Expected number of paramters
* @param string $command Command * @param string $command Command
* @access protected
*/ */
function _checkArgs($expectedNum, $command = null) { protected function _checkArgs($expectedNum, $command = null) {
if (!$command) { if (!$command) {
$command = $this->command; $command = $this->command;
} }
@ -496,9 +492,8 @@ class Shell extends Object {
* Action to create a Unit Test * Action to create a Unit Test
* *
* @return boolean Success * @return boolean Success
* @access protected
*/ */
function _checkUnitTest() { protected function _checkUnitTest() {
if (App::import('vendor', 'simpletest' . DS . 'simpletest')) { if (App::import('vendor', 'simpletest' . DS . 'simpletest')) {
return true; return true;
} }
@ -530,9 +525,8 @@ class Shell extends Object {
* *
* @param string $name Controller class name * @param string $name Controller class name
* @return string Path to controller * @return string Path to controller
* @access protected
*/ */
function _controllerPath($name) { protected function _controllerPath($name) {
return strtolower(Inflector::underscore($name)); return strtolower(Inflector::underscore($name));
} }
@ -541,9 +535,8 @@ class Shell extends Object {
* *
* @param string $name Controller class name * @param string $name Controller class name
* @return string Controller plural name * @return string Controller plural name
* @access protected
*/ */
function _controllerName($name) { protected function _controllerName($name) {
return Inflector::pluralize(Inflector::camelize($name)); return Inflector::pluralize(Inflector::camelize($name));
} }
@ -552,9 +545,8 @@ class Shell extends Object {
* *
* @param string $name Name * @param string $name Name
* @return string Camelized and singularized controller name * @return string Camelized and singularized controller name
* @access protected
*/ */
function _modelName($name) { protected function _modelName($name) {
return Inflector::camelize(Inflector::singularize($name)); return Inflector::camelize(Inflector::singularize($name));
} }
@ -563,9 +555,8 @@ class Shell extends Object {
* *
* @param string $name Controller class name * @param string $name Controller class name
* @return string Singular model key * @return string Singular model key
* @access protected
*/ */
function _modelKey($name) { protected function _modelKey($name) {
return Inflector::underscore(Inflector::singularize($name)) . '_id'; return Inflector::underscore(Inflector::singularize($name)) . '_id';
} }
@ -574,9 +565,8 @@ class Shell extends Object {
* *
* @param string $key Foreign key * @param string $key Foreign key
* @return string Model name * @return string Model name
* @access protected
*/ */
function _modelNameFromKey($key) { protected function _modelNameFromKey($key) {
return Inflector::camelize(str_replace('_id', '', $key)); return Inflector::camelize(str_replace('_id', '', $key));
} }
@ -585,9 +575,8 @@ class Shell extends Object {
* *
* @param string $name * @param string $name
* @return string $name * @return string $name
* @access protected
*/ */
function _singularName($name) { protected function _singularName($name) {
return Inflector::variable(Inflector::singularize($name)); return Inflector::variable(Inflector::singularize($name));
} }
@ -596,9 +585,8 @@ class Shell extends Object {
* *
* @param string $name Name to use * @param string $name Name to use
* @return string Plural name for views * @return string Plural name for views
* @access protected
*/ */
function _pluralName($name) { protected function _pluralName($name) {
return Inflector::variable(Inflector::pluralize($name)); return Inflector::variable(Inflector::pluralize($name));
} }
@ -607,9 +595,8 @@ class Shell extends Object {
* *
* @param string $name Controller name * @param string $name Controller name
* @return string Singular human name * @return string Singular human name
* @access protected
*/ */
function _singularHumanName($name) { protected function _singularHumanName($name) {
return Inflector::humanize(Inflector::underscore(Inflector::singularize($name))); return Inflector::humanize(Inflector::underscore(Inflector::singularize($name)));
} }
@ -618,9 +605,8 @@ class Shell extends Object {
* *
* @param string $name Controller name * @param string $name Controller name
* @return string Plural human name * @return string Plural human name
* @access protected
*/ */
function _pluralHumanName($name) { protected function _pluralHumanName($name) {
return Inflector::humanize(Inflector::underscore(Inflector::pluralize($name))); return Inflector::humanize(Inflector::underscore(Inflector::pluralize($name)));
} }

View file

@ -247,9 +247,8 @@ class FixtureTask extends BakeTask {
* *
* @param array $table Table schema array * @param array $table Table schema array
* @return string fields definitions * @return string fields definitions
* @access protected
*/ */
function _generateSchema($tableInfo) { protected function _generateSchema($tableInfo) {
$schema = $this->_Schema->generateTable('f', $tableInfo); $schema = $this->_Schema->generateTable('f', $tableInfo);
return substr($schema, 10, -2); return substr($schema, 10, -2);
} }
@ -259,9 +258,8 @@ class FixtureTask extends BakeTask {
* *
* @param array $table Table schema array * @param array $table Table schema array
* @return array Array of records to use in the fixture. * @return array Array of records to use in the fixture.
* @access protected
*/ */
function _generateRecords($tableInfo, $recordCount = 1) { protected function _generateRecords($tableInfo, $recordCount = 1) {
$records = array(); $records = array();
for ($i = 0; $i < $recordCount; $i++) { for ($i = 0; $i < $recordCount; $i++) {
$record = array(); $record = array();
@ -331,9 +329,8 @@ class FixtureTask extends BakeTask {
* *
* @param array $records Array of records to be converted to string * @param array $records Array of records to be converted to string
* @return string A string value of the $records array. * @return string A string value of the $records array.
* @access protected
*/ */
function _makeRecordString($records) { protected function _makeRecordString($records) {
$out = "array(\n"; $out = "array(\n";
foreach ($records as $record) { foreach ($records as $record) {
$values = array(); $values = array();
@ -355,9 +352,8 @@ class FixtureTask extends BakeTask {
* @param string $modelName name of the model to take records from. * @param string $modelName name of the model to take records from.
* @param string $useTable Name of table to use. * @param string $useTable Name of table to use.
* @return array Array of records. * @return array Array of records.
* @access protected
*/ */
function _getRecordsFromTable($modelName, $useTable = null) { protected function _getRecordsFromTable($modelName, $useTable = null) {
if ($this->interactive) { if ($this->interactive) {
$condition = null; $condition = null;
$prompt = __("Please provide a SQL fragment to use as conditions\nExample: WHERE 1=1 LIMIT 10", true); $prompt = __("Please provide a SQL fragment to use as conditions\nExample: WHERE 1=1 LIMIT 10", true);

View file

@ -294,9 +294,8 @@ class TestTask extends BakeTask {
* *
* @param Model $subject A Model class to scan for associations and pull fixtures off of. * @param Model $subject A Model class to scan for associations and pull fixtures off of.
* @return void * @return void
* @access protected
*/ */
function _processModel(&$subject) { protected function _processModel(&$subject) {
$this->_addFixture($subject->name); $this->_addFixture($subject->name);
$associated = $subject->getAssociated(); $associated = $subject->getAssociated();
foreach ($associated as $alias => $type) { foreach ($associated as $alias => $type) {
@ -319,9 +318,8 @@ class TestTask extends BakeTask {
* *
* @param Controller $subject A controller to pull model names off of. * @param Controller $subject A controller to pull model names off of.
* @return void * @return void
* @access protected
*/ */
function _processController(&$subject) { protected function _processController(&$subject) {
$subject->constructClasses(); $subject->constructClasses();
$models = array(Inflector::classify($subject->name)); $models = array(Inflector::classify($subject->name));
if (!empty($subject->uses)) { if (!empty($subject->uses)) {
@ -338,9 +336,8 @@ class TestTask extends BakeTask {
* *
* @param string $name Name of the Model class that a fixture might be required for. * @param string $name Name of the Model class that a fixture might be required for.
* @return void * @return void
* @access protected
*/ */
function _addFixture($name) { protected function _addFixture($name) {
$parent = get_parent_class($name); $parent = get_parent_class($name);
$prefix = 'app.'; $prefix = 'app.';
if (strtolower($parent) != 'appmodel' && strtolower(substr($parent, -8)) == 'appmodel') { if (strtolower($parent) != 'appmodel' && strtolower(substr($parent, -8)) == 'appmodel') {

View file

@ -179,9 +179,8 @@ class Dispatcher extends Object {
* @param array $params Parameters with at least the 'action' to invoke * @param array $params Parameters with at least the 'action' to invoke
* @param boolean $missingAction Set to true if missing action should be rendered, false otherwise * @param boolean $missingAction Set to true if missing action should be rendered, false otherwise
* @return string Output as sent by controller * @return string Output as sent by controller
* @access protected
*/ */
function _invoke(&$controller, $params) { protected function _invoke(&$controller, $params) {
$controller->constructClasses(); $controller->constructClasses();
$controller->startupProcess(); $controller->startupProcess();
@ -370,9 +369,8 @@ class Dispatcher extends Object {
* @param boolean $reverse If true all the params are shifted one forward, so plugin becomes * @param boolean $reverse If true all the params are shifted one forward, so plugin becomes
* controller, controller becomes action etc. If false, plugin is made equal to controller * controller, controller becomes action etc. If false, plugin is made equal to controller
* @return array Restructured array * @return array Restructured array
* @access protected
*/ */
function _restructureParams($params, $reverse = false) { protected function _restructureParams($params, $reverse = false) {
if ($reverse === true) { if ($reverse === true) {
extract(Router::getArgs($params['action'])); extract(Router::getArgs($params['action']));
$params = array_merge($params, array( $params = array_merge($params, array(
@ -648,9 +646,8 @@ class Dispatcher extends Object {
* @param string $assetFile Path to the asset file in the file system * @param string $assetFile Path to the asset file in the file system
* @param string $ext The extension of the file to determine its mime type * @param string $ext The extension of the file to determine its mime type
* @return void * @return void
* @access protected
*/ */
function _deliverAsset($assetFile, $ext) { protected function _deliverAsset($assetFile, $ext) {
$ob = @ini_get("zlib.output_compression") !== '1' && extension_loaded("zlib") && (strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false); $ob = @ini_get("zlib.output_compression") !== '1' && extension_loaded("zlib") && (strpos(env('HTTP_ACCEPT_ENCODING'), 'gzip') !== false);
if ($ob && Configure::read('Asset.compress')) { if ($ob && Configure::read('Asset.compress')) {
ob_start(); ob_start();

View file

@ -136,9 +136,8 @@ class Cache {
* *
* @param string $name Name of the config array that needs an engine instance built * @param string $name Name of the config array that needs an engine instance built
* @return void * @return void
* @access protected
*/ */
function _buildEngine($name) { protected function _buildEngine($name) {
$config = $this->__config[$name]; $config = $this->__config[$name];
list($plugin, $class) = pluginSplit($config['engine']); list($plugin, $class) = pluginSplit($config['engine']);

View file

@ -117,9 +117,8 @@ class CakeLog {
* *
* @param string $loggerName the plugin.className of the logger class you want to build. * @param string $loggerName the plugin.className of the logger class you want to build.
* @return mixed boolean false on any failures, string of classname to use if search was successful. * @return mixed boolean false on any failures, string of classname to use if search was successful.
* @access protected
*/ */
function _getLogger($loggerName) { protected function _getLogger($loggerName) {
list($plugin, $loggerName) = pluginSplit($loggerName); list($plugin, $loggerName) = pluginSplit($loggerName);
if ($plugin) { if ($plugin) {
@ -173,9 +172,8 @@ class CakeLog {
* Configures the automatic/default stream a FileLog. * Configures the automatic/default stream a FileLog.
* *
* @return void * @return void
* @access protected
*/ */
function _autoConfig() { protected function _autoConfig() {
if (!class_exists('FileLog')) { if (!class_exists('FileLog')) {
App::import('Core', 'log/FileLog'); App::import('Core', 'log/FileLog');
} }

View file

@ -587,9 +587,8 @@ class CakeSession extends Object {
* Helper method to create a new session. * Helper method to create a new session.
* *
* @return void * @return void
* @access protected
*/ */
function _checkValid() { protected function _checkValid() {
if ($this->read('Config')) { if ($this->read('Config')) {
if ((Configure::read('Session.checkAgent') === false || $this->_userAgent == $this->read('Config.userAgent')) && $this->time <= $this->read('Config.time')) { if ((Configure::read('Session.checkAgent') === false || $this->_userAgent == $this->read('Config.userAgent')) && $this->time <= $this->read('Config.time')) {
$time = $this->read('Config.time'); $time = $this->read('Config.time');

View file

@ -191,9 +191,8 @@ class Component extends Object {
* @param object $object Object with a Components array * @param object $object Object with a Components array
* @param object $parent the parent of the current object * @param object $parent the parent of the current object
* @return void * @return void
* @access protected
*/ */
function _loadComponents(&$object, $parent = null) { protected function _loadComponents(&$object, $parent = null) {
$base = $this->__controllerVars['base']; $base = $this->__controllerVars['base'];
$normal = Set::normalize($object->components); $normal = Set::normalize($object->components);
foreach ((array)$normal as $component => $config) { foreach ((array)$normal as $component => $config) {

View file

@ -71,9 +71,8 @@ class AclComponent extends Object {
/** /**
* Empty class defintion, to be overridden in subclasses. * Empty class defintion, to be overridden in subclasses.
* *
* @access protected
*/ */
function _initACL() { protected function _initACL() {
} }
/** /**
@ -460,9 +459,8 @@ class DbAcl extends AclBase {
* *
* @param array $keys Permission model info * @param array $keys Permission model info
* @return array ACO keys * @return array ACO keys
* @access protected
*/ */
function _getAcoKeys($keys) { protected function _getAcoKeys($keys) {
$newKeys = array(); $newKeys = array();
$keys = array_keys($keys); $keys = array_keys($keys);
foreach ($keys as $key) { foreach ($keys as $key) {

View file

@ -421,9 +421,8 @@ class SecurityComponent extends Object {
* @param string $method The HTTP method to assign controller actions to * @param string $method The HTTP method to assign controller actions to
* @param array $actions Controller actions to set the required HTTP method to. * @param array $actions Controller actions to set the required HTTP method to.
* @return void * @return void
* @access protected
*/ */
function _requireMethod($method, $actions = array()) { protected function _requireMethod($method, $actions = array()) {
if (isset($actions[0]) && is_array($actions[0])) { if (isset($actions[0]) && is_array($actions[0])) {
$actions = $actions[0]; $actions = $actions[0];
} }
@ -435,9 +434,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool true if $method is required * @return bool true if $method is required
* @access protected
*/ */
function _methodsRequired(&$controller) { protected function _methodsRequired(&$controller) {
foreach (array('Post', 'Get', 'Put', 'Delete') as $method) { foreach (array('Post', 'Get', 'Put', 'Delete') as $method) {
$property = 'require' . $method; $property = 'require' . $method;
if (is_array($this->$property) && !empty($this->$property)) { if (is_array($this->$property) && !empty($this->$property)) {
@ -460,9 +458,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool true if secure connection required * @return bool true if secure connection required
* @access protected
*/ */
function _secureRequired(&$controller) { protected function _secureRequired(&$controller) {
if (is_array($this->requireSecure) && !empty($this->requireSecure)) { if (is_array($this->requireSecure) && !empty($this->requireSecure)) {
$requireSecure = array_map('strtolower', $this->requireSecure); $requireSecure = array_map('strtolower', $this->requireSecure);
@ -482,9 +479,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool true if authentication required * @return bool true if authentication required
* @access protected
*/ */
function _authRequired(&$controller) { protected function _authRequired(&$controller) {
if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($controller->data)) { if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($controller->data)) {
$requireAuth = array_map('strtolower', $this->requireAuth); $requireAuth = array_map('strtolower', $this->requireAuth);
@ -518,9 +514,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool true if login is required * @return bool true if login is required
* @access protected
*/ */
function _loginRequired(&$controller) { protected function _loginRequired(&$controller) {
if (is_array($this->requireLogin) && !empty($this->requireLogin)) { if (is_array($this->requireLogin) && !empty($this->requireLogin)) {
$requireLogin = array_map('strtolower', $this->requireLogin); $requireLogin = array_map('strtolower', $this->requireLogin);
@ -566,9 +561,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool true if submitted form is valid * @return bool true if submitted form is valid
* @access protected
*/ */
function _validatePost(&$controller) { protected function _validatePost(&$controller) {
if (empty($controller->data)) { if (empty($controller->data)) {
return true; return true;
} }
@ -647,9 +641,8 @@ class SecurityComponent extends Object {
* *
* @param object $controller Instantiating controller * @param object $controller Instantiating controller
* @return bool Success * @return bool Success
* @access protected
*/ */
function _generateToken(&$controller) { protected function _generateToken(&$controller) {
if (isset($controller->params['requested']) && $controller->params['requested'] === 1) { if (isset($controller->params['requested']) && $controller->params['requested'] === 1) {
if ($this->Session->check('_Token')) { if ($this->Session->check('_Token')) {
$tokenData = unserialize($this->Session->read('_Token')); $tokenData = unserialize($this->Session->read('_Token'));
@ -693,9 +686,8 @@ class SecurityComponent extends Object {
* *
* @param array $options Default login options * @param array $options Default login options
* @return void * @return void
* @access protected
*/ */
function _setLoginDefaults(&$options) { protected function _setLoginDefaults(&$options) {
$options = array_merge(array( $options = array_merge(array(
'type' => 'basic', 'type' => 'basic',
'realm' => env('SERVER_NAME'), 'realm' => env('SERVER_NAME'),
@ -712,9 +704,8 @@ class SecurityComponent extends Object {
* @param string $method Method to execute * @param string $method Method to execute
* @param array $params Parameters to send to method * @param array $params Parameters to send to method
* @return mixed Controller callback method's response * @return mixed Controller callback method's response
* @access protected
*/ */
function _callback(&$controller, $method, $params = array()) { protected function _callback(&$controller, $method, $params = array()) {
if (is_callable(array($controller, $method))) { if (is_callable(array($controller, $method))) {
return call_user_func_array(array(&$controller, $method), empty($params) ? null : $params); return call_user_func_array(array(&$controller, $method), empty($params) ? null : $params);
} else { } else {

View file

@ -394,9 +394,8 @@ class Controller extends Object {
* Merge components, helpers, and uses vars from AppController and PluginAppController. * Merge components, helpers, and uses vars from AppController and PluginAppController.
* *
* @return void * @return void
* @access protected
*/ */
function __mergeVars() { protected function __mergeVars() {
$pluginName = Inflector::camelize($this->plugin); $pluginName = Inflector::camelize($this->plugin);
$pluginController = $pluginName . 'AppController'; $pluginController = $pluginName . 'AppController';

View file

@ -206,9 +206,8 @@ class Scaffold extends Object {
* Outputs the content of a scaffold method passing it through the Controller::afterFilter() * Outputs the content of a scaffold method passing it through the Controller::afterFilter()
* *
* @return void * @return void
* @access protected
*/ */
function _output() { protected function _output() {
$this->controller->afterFilter(); $this->controller->afterFilter();
echo($this->controller->output); echo($this->controller->output);
} }
@ -550,9 +549,8 @@ class ScaffoldView extends ThemeView {
* Override _getViewFileName * Override _getViewFileName
* *
* @return string action * @return string action
* @access protected
*/ */
function _getViewFileName($name = null) { protected function _getViewFileName($name = null) {
if ($name === null) { if ($name === null) {
$name = $this->action; $name = $this->action;
} }

View file

@ -562,9 +562,8 @@ class Debugger extends Object {
* @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for * @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for
* straight HTML output, or 'txt' for unformatted text. * straight HTML output, or 'txt' for unformatted text.
* @param array $strings Template strings to be used for the output format. * @param array $strings Template strings to be used for the output format.
* @access protected
*/ */
function output($format = null, $strings = array()) { protected function output($format = null, $strings = array()) {
$_this =& Debugger::getInstance(); $_this =& Debugger::getInstance();
$data = null; $data = null;

View file

@ -433,9 +433,8 @@ class ErrorHandler extends Object {
/** /**
* Output message * Output message
* *
* @access protected
*/ */
function _outputMessage($template) { protected function _outputMessage($template) {
$this->controller->render($template); $this->controller->render($template);
$this->controller->afterFilter(); $this->controller->afterFilter();
echo $this->controller->output; echo $this->controller->output;

View file

@ -430,9 +430,8 @@ class HttpSocket extends CakeSocket {
* *
* @param string $message Message to parse * @param string $message Message to parse
* @return array Parsed message (with indexed elements such as raw, status, header, body) * @return array Parsed message (with indexed elements such as raw, status, header, body)
* @access protected
*/ */
function _parseResponse($message) { protected function _parseResponse($message) {
if (is_array($message)) { if (is_array($message)) {
return $message; return $message;
} elseif (!is_string($message)) { } elseif (!is_string($message)) {
@ -494,9 +493,8 @@ class HttpSocket extends CakeSocket {
* @param string $body A string continaing the body to decode. * @param string $body A string continaing the body to decode.
* @param mixed $encoding Can be false in case no encoding is being used, or a string representing the encoding. * @param mixed $encoding Can be false in case no encoding is being used, or a string representing the encoding.
* @return mixed Array of response headers and body or false. * @return mixed Array of response headers and body or false.
* @access protected
*/ */
function _decodeBody($body, $encoding = 'chunked') { protected function _decodeBody($body, $encoding = 'chunked') {
if (!is_string($body)) { if (!is_string($body)) {
return false; return false;
} }
@ -520,9 +518,8 @@ class HttpSocket extends CakeSocket {
* *
* @param string $body A string continaing the chunked body to decode. * @param string $body A string continaing the chunked body to decode.
* @return mixed Array of response headers and body or false. * @return mixed Array of response headers and body or false.
* @access protected
*/ */
function _decodeChunkedBody($body) { protected function _decodeChunkedBody($body) {
if (!is_string($body)) { if (!is_string($body)) {
return false; return false;
} }
@ -582,9 +579,8 @@ class HttpSocket extends CakeSocket {
* *
* @param mixed $uri URI, See HttpSocket::_parseUri() * @param mixed $uri URI, See HttpSocket::_parseUri()
* @return array Current configuration settings * @return array Current configuration settings
* @access protected
*/ */
function _configUri($uri = null) { protected function _configUri($uri = null) {
if (empty($uri)) { if (empty($uri)) {
return false; return false;
} }
@ -616,9 +612,8 @@ class HttpSocket extends CakeSocket {
* @param mixed $uri Either A $uri array, or a request string. Will use $this->config if left empty. * @param mixed $uri Either A $uri array, or a request string. Will use $this->config if left empty.
* @param string $uriTemplate The Uri template/format to use. * @param string $uriTemplate The Uri template/format to use.
* @return mixed A fully qualified URL formated according to $uriTemplate, or false on failure * @return mixed A fully qualified URL formated according to $uriTemplate, or false on failure
* @access protected
*/ */
function _buildUri($uri = array(), $uriTemplate = '%scheme://%user:%pass@%host:%port/%path?%query#%fragment') { protected function _buildUri($uri = array(), $uriTemplate = '%scheme://%user:%pass@%host:%port/%path?%query#%fragment') {
if (is_string($uri)) { if (is_string($uri)) {
$uri = array('host' => $uri); $uri = array('host' => $uri);
} }
@ -664,9 +659,8 @@ class HttpSocket extends CakeSocket {
* @param string $uri URI to parse * @param string $uri URI to parse
* @param mixed $base If true use default URI config, otherwise indexed array to set 'scheme', 'host', 'port', etc. * @param mixed $base If true use default URI config, otherwise indexed array to set 'scheme', 'host', 'port', etc.
* @return array Parsed URI * @return array Parsed URI
* @access protected
*/ */
function _parseUri($uri = null, $base = array()) { protected function _parseUri($uri = null, $base = array()) {
$uriBase = array( $uriBase = array(
'scheme' => array('http', 'https'), 'scheme' => array('http', 'https'),
'host' => null, 'host' => null,
@ -730,9 +724,8 @@ class HttpSocket extends CakeSocket {
* @param mixed $query A query string to parse into an array or an array to return directly "as is" * @param mixed $query A query string to parse into an array or an array to return directly "as is"
* @return array The $query parsed into a possibly multi-level array. If an empty $query is * @return array The $query parsed into a possibly multi-level array. If an empty $query is
* given, an empty array is returned. * given, an empty array is returned.
* @access protected
*/ */
function _parseQuery($query) { protected function _parseQuery($query) {
if (is_array($query)) { if (is_array($query)) {
return $query; return $query;
} }
@ -788,9 +781,8 @@ class HttpSocket extends CakeSocket {
* @param array $request Needs to contain a 'uri' key. Should also contain a 'method' key, otherwise defaults to GET. * @param array $request Needs to contain a 'uri' key. Should also contain a 'method' key, otherwise defaults to GET.
* @param string $versionToken The version token to use, defaults to HTTP/1.1 * @param string $versionToken The version token to use, defaults to HTTP/1.1
* @return string Request line * @return string Request line
* @access protected
*/ */
function _buildRequestLine($request = array(), $versionToken = 'HTTP/1.1') { protected function _buildRequestLine($request = array(), $versionToken = 'HTTP/1.1') {
$asteriskMethods = array('OPTIONS'); $asteriskMethods = array('OPTIONS');
if (is_string($request)) { if (is_string($request)) {
@ -822,9 +814,8 @@ class HttpSocket extends CakeSocket {
* *
* @param array $data Data to serialize * @param array $data Data to serialize
* @return string Serialized variable * @return string Serialized variable
* @access protected
*/ */
function _httpSerialize($data = array()) { protected function _httpSerialize($data = array()) {
if (is_string($data)) { if (is_string($data)) {
return $data; return $data;
} }
@ -839,9 +830,8 @@ class HttpSocket extends CakeSocket {
* *
* @param array $header Header to build * @param array $header Header to build
* @return string Header built from array * @return string Header built from array
* @access protected
*/ */
function _buildHeader($header, $mode = 'standard') { protected function _buildHeader($header, $mode = 'standard') {
if (is_string($header)) { if (is_string($header)) {
return $header; return $header;
} elseif (!is_array($header)) { } elseif (!is_array($header)) {
@ -868,9 +858,8 @@ class HttpSocket extends CakeSocket {
* *
* @param array $header Header as an indexed array (field => value) * @param array $header Header as an indexed array (field => value)
* @return array Parsed header * @return array Parsed header
* @access protected
*/ */
function _parseHeader($header) { protected function _parseHeader($header) {
if (is_array($header)) { if (is_array($header)) {
foreach ($header as $field => $value) { foreach ($header as $field => $value) {
unset($header[$field]); unset($header[$field]);

View file

@ -272,9 +272,8 @@ class Inflector {
* @param string $key Original value * @param string $key Original value
* @param string $value Inflected value * @param string $value Inflected value
* @return string Inflected value, from cache * @return string Inflected value, from cache
* @access protected
*/ */
function _cache($type, $key, $value = false) { protected function _cache($type, $key, $value = false) {
$key = '_' . $key; $key = '_' . $key;
$type = '_' . $type; $type = '_' . $type;
if ($value !== false) { if ($value !== false) {

View file

@ -332,9 +332,8 @@ class TranslateBehavior extends ModelBehavior {
* Get selected locale for model * Get selected locale for model
* *
* @return mixed string or false * @return mixed string or false
* @access protected
*/ */
function _getLocale(&$model) { protected function _getLocale(&$model) {
if (!isset($model->locale) || is_null($model->locale)) { if (!isset($model->locale) || is_null($model->locale)) {
if (!class_exists('I18n')) { if (!class_exists('I18n')) {
App::import('Core', 'i18n'); App::import('Core', 'i18n');

View file

@ -798,9 +798,8 @@ class TreeBehavior extends ModelBehavior {
* @param AppModel $Model Model instance * @param AppModel $Model Model instance
* @param mixed $parentId * @param mixed $parentId
* @return boolean true on success, false on failure * @return boolean true on success, false on failure
* @access protected
*/ */
function _setParent(&$Model, $parentId = null, $created = false) { protected function _setParent(&$Model, $parentId = null, $created = false) {
extract($this->settings[$Model->alias]); extract($this->settings[$Model->alias]);
list($node) = array_values($Model->find('first', array( list($node) = array_values($Model->find('first', array(
'conditions' => array($scope, $Model->escapeField() => $Model->id), 'conditions' => array($scope, $Model->escapeField() => $Model->id),

View file

@ -110,9 +110,8 @@ class CakeSchema extends Object {
* *
* @param array $data loaded object properties * @param array $data loaded object properties
* @return void * @return void
* @access protected
*/ */
function _build($data) { protected function _build($data) {
$file = null; $file = null;
foreach ($data as $key => $val) { foreach ($data as $key => $val) {
if (!empty($val)) { if (!empty($val)) {

View file

@ -187,9 +187,8 @@ class DboMssql extends DboSource {
* *
* @param string $sql SQL statement * @param string $sql SQL statement
* @return resource Result resource identifier * @return resource Result resource identifier
* @access protected
*/ */
function _execute($sql) { protected function _execute($sql) {
$result = @mssql_query($sql, $this->connection); $result = @mssql_query($sql, $this->connection);
$this->__lastQueryHadError = ($result === false); $this->__lastQueryHadError = ($result === false);
return $result; return $result;
@ -701,9 +700,8 @@ class DboMssql extends DboSource {
* @param string $table * @param string $table
* @param string $fields * @param string $fields
* @param array $values * @param array $values
* @access protected
*/ */
function insertMulti($table, $fields, $values) { protected function insertMulti($table, $fields, $values) {
$primaryKey = $this->_getPrimaryKey($table); $primaryKey = $this->_getPrimaryKey($table);
$hasPrimaryKey = $primaryKey != null && ( $hasPrimaryKey = $primaryKey != null && (
(is_array($fields) && in_array($primaryKey, $fields) (is_array($fields) && in_array($primaryKey, $fields)

View file

@ -582,9 +582,8 @@ class DboMysql extends DboMysqlBase {
* *
* @param string $sql SQL statement * @param string $sql SQL statement
* @return resource Result resource identifier * @return resource Result resource identifier
* @access protected
*/ */
function _execute($sql) { protected function _execute($sql) {
return mysql_query($sql, $this->connection); return mysql_query($sql, $this->connection);
} }

View file

@ -106,9 +106,8 @@ class DboMysqli extends DboMysqlBase {
* *
* @param string $sql SQL statement * @param string $sql SQL statement
* @return resource Result resource identifier * @return resource Result resource identifier
* @access protected
*/ */
function _execute($sql) { protected function _execute($sql) {
if (preg_match('/^\s*call/i', $sql)) { if (preg_match('/^\s*call/i', $sql)) {
return $this->_executeProcedure($sql); return $this->_executeProcedure($sql);
} }
@ -120,9 +119,8 @@ class DboMysqli extends DboMysqlBase {
* *
* @param string $sql SQL statement (procedure call) * @param string $sql SQL statement (procedure call)
* @return resource Result resource identifier for first recordset * @return resource Result resource identifier for first recordset
* @access protected
*/ */
function _executeProcedure($sql) { protected function _executeProcedure($sql) {
$answer = mysqli_multi_query($this->connection, $sql); $answer = mysqli_multi_query($this->connection, $sql);
$firstResult = mysqli_store_result($this->connection); $firstResult = mysqli_store_result($this->connection);

View file

@ -259,9 +259,8 @@ class DboOracle extends DboSource {
* *
* @param string $sql * @param string $sql
* @return false if sql is nor a SELECT * @return false if sql is nor a SELECT
* @access protected
*/ */
function _scrapeSQL($sql) { protected function _scrapeSQL($sql) {
$sql = str_replace("\"", '', $sql); $sql = str_replace("\"", '', $sql);
$preFrom = preg_split('/\bFROM\b/', $sql); $preFrom = preg_split('/\bFROM\b/', $sql);
$preFrom = $preFrom[0]; $preFrom = $preFrom[0];
@ -330,9 +329,8 @@ class DboOracle extends DboSource {
* *
* @param string $sql SQL statement * @param string $sql SQL statement
* @return resource Result resource identifier or null * @return resource Result resource identifier or null
* @access protected
*/ */
function _execute($sql) { protected function _execute($sql) {
$this->_statementId = @ociparse($this->connection, $sql); $this->_statementId = @ociparse($this->connection, $sql);
if (!$this->_statementId) { if (!$this->_statementId) {
$this->_setError($this->connection); $this->_setError($this->connection);

View file

@ -1556,9 +1556,8 @@ class DboSource extends DataSource {
* @param boolean $quoteValues If values should be quoted, or treated as SQL snippets * @param boolean $quoteValues If values should be quoted, or treated as SQL snippets
* @param boolean $alias Include the model alias in the field name * @param boolean $alias Include the model alias in the field name
* @return array Fields and values, quoted and preparted * @return array Fields and values, quoted and preparted
* @access protected
*/ */
function _prepareUpdateFields(&$model, $fields, $quoteValues = true, $alias = false) { protected function _prepareUpdateFields(&$model, $fields, $quoteValues = true, $alias = false) {
$quotedAlias = $this->startQuote . $model->alias . $this->endQuote; $quotedAlias = $this->startQuote . $model->alias . $this->endQuote;
$updates = array(); $updates = array();
@ -1624,9 +1623,8 @@ class DboSource extends DataSource {
* @param Model $model * @param Model $model
* @param mixed $conditions * @param mixed $conditions
* @return array List of record IDs * @return array List of record IDs
* @access protected
*/ */
function _matchRecords(&$model, $conditions = null) { protected function _matchRecords(&$model, $conditions = null) {
if ($conditions === true) { if ($conditions === true) {
$conditions = $this->conditions(true); $conditions = $this->conditions(true);
} elseif ($conditions === null) { } elseif ($conditions === null) {
@ -1670,9 +1668,8 @@ class DboSource extends DataSource {
* *
* @param object $model * @param object $model
* @return array * @return array
* @access protected
*/ */
function _getJoins($model) { protected function _getJoins($model) {
$join = array(); $join = array();
$joins = array_merge($model->getAssociated('hasOne'), $model->getAssociated('belongsTo')); $joins = array_merge($model->getAssociated('hasOne'), $model->getAssociated('belongsTo'));
@ -2528,9 +2525,8 @@ class DboSource extends DataSource {
* @param string $table * @param string $table
* @param string $fields * @param string $fields
* @param array $values * @param array $values
* @access protected
*/ */
function insertMulti($table, $fields, $values) { protected function insertMulti($table, $fields, $values) {
$table = $this->fullTableName($table); $table = $this->fullTableName($table);
if (is_array($fields)) { if (is_array($fields)) {
$fields = implode(', ', array_map(array(&$this, 'name'), $fields)); $fields = implode(', ', array_map(array(&$this, 'name'), $fields));

View file

@ -490,9 +490,8 @@ class Model extends Overloadable {
* @param string $method Name of method to call. * @param string $method Name of method to call.
* @param array $params Parameters for the method. * @param array $params Parameters for the method.
* @return mixed Whatever is returned by called method * @return mixed Whatever is returned by called method
* @access protected
*/ */
function call__($method, $params) { protected function call__($method, $params) {
$result = $this->Behaviors->dispatchMethod($this, $method, $params); $result = $this->Behaviors->dispatchMethod($this, $method, $params);
if ($result !== array('unhandled')) { if ($result !== array('unhandled')) {
@ -1511,9 +1510,8 @@ class Model extends Overloadable {
* @param array $data The fields of the record that will be updated * @param array $data The fields of the record that will be updated
* @return array Returns updated foreign key values, along with an 'old' key containing the old * @return array Returns updated foreign key values, along with an 'old' key containing the old
* values, or empty if no foreign keys are updated. * values, or empty if no foreign keys are updated.
* @access protected
*/ */
function _prepareUpdateFields($data) { protected function _prepareUpdateFields($data) {
$foreignKeys = array(); $foreignKeys = array();
foreach ($this->belongsTo as $assoc => $info) { foreach ($this->belongsTo as $assoc => $info) {
if ($info['counterCache']) { if ($info['counterCache']) {
@ -1819,9 +1817,8 @@ class Model extends Overloadable {
* @param string $id ID of record that was deleted * @param string $id ID of record that was deleted
* @param boolean $cascade Set to true to delete records that depend on this record * @param boolean $cascade Set to true to delete records that depend on this record
* @return void * @return void
* @access protected
*/ */
function _deleteDependent($id, $cascade) { protected function _deleteDependent($id, $cascade) {
if (!empty($this->__backAssociation)) { if (!empty($this->__backAssociation)) {
$savedAssociatons = $this->__backAssociation; $savedAssociatons = $this->__backAssociation;
$this->__backAssociation = array(); $this->__backAssociation = array();
@ -1861,9 +1858,8 @@ class Model extends Overloadable {
* *
* @param string $id ID of record that was deleted * @param string $id ID of record that was deleted
* @return void * @return void
* @access protected
*/ */
function _deleteLinks($id) { protected function _deleteLinks($id) {
foreach ($this->hasAndBelongsToMany as $assoc => $data) { foreach ($this->hasAndBelongsToMany as $assoc => $data) {
$joinModel = $data['with']; $joinModel = $data['with'];
$records = $this->{$joinModel}->find('all', array( $records = $this->{$joinModel}->find('all', array(
@ -2208,9 +2204,8 @@ class Model extends Overloadable {
* @param mixed $query * @param mixed $query
* @param array $results * @param array $results
* @return array * @return array
* @access protected
*/ */
function _findNeighbors($state, $query, $results = array()) { protected function _findNeighbors($state, $query, $results = array()) {
if ($state == 'before') { if ($state == 'before') {
$query = array_merge(array('recursive' => 0), $query); $query = array_merge(array('recursive' => 0), $query);
extract($query); extract($query);
@ -2267,9 +2262,8 @@ class Model extends Overloadable {
* @param mixed $query * @param mixed $query
* @param array $results * @param array $results
* @return array Threaded results * @return array Threaded results
* @access protected
*/ */
function _findThreaded($state, $query, $results = array()) { protected function _findThreaded($state, $query, $results = array()) {
if ($state == 'before') { if ($state == 'before') {
return $query; return $query;
} elseif ($state == 'after') { } elseif ($state == 'after') {

View file

@ -156,9 +156,8 @@ class Object {
* *
* @param array $properties An associative array containing properties and corresponding values. * @param array $properties An associative array containing properties and corresponding values.
* @return void * @return void
* @access protected
*/ */
function _set($properties = array()) { protected function _set($properties = array()) {
if (is_array($properties) && !empty($properties)) { if (is_array($properties) && !empty($properties)) {
$vars = get_object_vars($this); $vars = get_object_vars($this);
foreach ($properties as $key => $val) { foreach ($properties as $key => $val) {
@ -236,9 +235,8 @@ class Object {
* @param string $name name used for object to cache * @param string $name name used for object to cache
* @param object $object the object to persist * @param object $object the object to persist
* @return boolean true on save, throws error if file can not be created * @return boolean true on save, throws error if file can not be created
* @access protected
*/ */
function _savePersistent($name, &$object) { protected function _savePersistent($name, &$object) {
$file = 'persistent' . DS . strtolower($name) . '.php'; $file = 'persistent' . DS . strtolower($name) . '.php';
$objectArray = array(&$object); $objectArray = array(&$object);
$data = str_replace('\\', '\\\\', serialize($objectArray)); $data = str_replace('\\', '\\\\', serialize($objectArray));

View file

@ -1321,9 +1321,8 @@ class CakeRoute {
* properties to compile a regular expression that can be used to parse request strings. * properties to compile a regular expression that can be used to parse request strings.
* *
* @return void * @return void
* @access protected
*/ */
function _writeRoute() { protected function _writeRoute() {
if (empty($this->template) || ($this->template === '/')) { if (empty($this->template) || ($this->template === '/')) {
$this->_compiledRoute = '#^/*$#'; $this->_compiledRoute = '#^/*$#';
$this->keys = array(); $this->keys = array();
@ -1522,9 +1521,8 @@ class CakeRoute {
* *
* @param array $params The params to convert to a string url. * @param array $params The params to convert to a string url.
* @return string Composed route string. * @return string Composed route string.
* @access protected
*/ */
function _writeUrl($params) { protected function _writeUrl($params) {
if (isset($params['plugin'], $params['controller']) && $params['plugin'] === $params['controller']) { if (isset($params['plugin'], $params['controller']) && $params['plugin'] === $params['controller']) {
unset($params['controller']); unset($params['controller']);
} }

View file

@ -562,9 +562,8 @@ class Validation extends Object {
* *
* @param string $check IP Address to test * @param string $check IP Address to test
* @return boolean Success * @return boolean Success
* @access protected
*/ */
function _ipv4($check) { protected function _ipv4($check) {
if (function_exists('filter_var')) { if (function_exists('filter_var')) {
return filter_var($check, FILTER_VALIDATE_IP, array('flags' => FILTER_FLAG_IPV4)) !== false; return filter_var($check, FILTER_VALIDATE_IP, array('flags' => FILTER_FLAG_IPV4)) !== false;
} }
@ -579,9 +578,8 @@ class Validation extends Object {
* *
* @param string $check IP Address to test * @param string $check IP Address to test
* @return boolean Success * @return boolean Success
* @access protected
*/ */
function _ipv6($check) { protected function _ipv6($check) {
if (function_exists('filter_var')) { if (function_exists('filter_var')) {
return filter_var($check, FILTER_VALIDATE_IP, array('flags' => FILTER_FLAG_IPV6)) !== false; return filter_var($check, FILTER_VALIDATE_IP, array('flags' => FILTER_FLAG_IPV6)) !== false;
} }
@ -912,9 +910,8 @@ class Validation extends Object {
* Runs a regular expression match. * Runs a regular expression match.
* *
* @return boolean Success of match * @return boolean Success of match
* @access protected
*/ */
function _check() { protected function _check() {
$_this =& Validation::getInstance(); $_this =& Validation::getInstance();
if (preg_match($_this->regex, $_this->check)) { if (preg_match($_this->regex, $_this->check)) {
$_this->error[] = false; $_this->error[] = false;
@ -931,9 +928,8 @@ class Validation extends Object {
* *
* @param array $params Parameters sent to validation method * @param array $params Parameters sent to validation method
* @return void * @return void
* @access protected
*/ */
function _extract($params) { protected function _extract($params) {
$_this =& Validation::getInstance(); $_this =& Validation::getInstance();
extract($params, EXTR_OVERWRITE); extract($params, EXTR_OVERWRITE);
@ -959,9 +955,8 @@ class Validation extends Object {
* *
* @see http://en.wikipedia.org/wiki/Luhn_algorithm * @see http://en.wikipedia.org/wiki/Luhn_algorithm
* @return boolean Success * @return boolean Success
* @access protected
*/ */
function _luhn() { protected function _luhn() {
$_this =& Validation::getInstance(); $_this =& Validation::getInstance();
if ($_this->deep !== true) { if ($_this->deep !== true) {
return true; return true;

View file

@ -146,9 +146,8 @@ class Helper extends Overloadable {
/** /**
* Default overload methods * Default overload methods
* *
* @access protected
*/ */
function get__($name) {} protected function get__($name) {}
function set__($name, $value) {} function set__($name, $value) {}
function call__($method, $params) { function call__($method, $params) {
trigger_error(sprintf(__('Method %1$s::%2$s does not exist', true), get_class($this), $method), E_USER_WARNING); trigger_error(sprintf(__('Method %1$s::%2$s does not exist', true), get_class($this), $method), E_USER_WARNING);
@ -714,9 +713,8 @@ class Helper extends Overloadable {
* @param string $field The field name to initialize. * @param string $field The field name to initialize.
* @param array $options Array of options to use while initializing an input field. * @param array $options Array of options to use while initializing an input field.
* @return array Array options for the form input. * @return array Array options for the form input.
* @access protected
*/ */
function _initInputField($field, $options = array()) { protected function _initInputField($field, $options = array()) {
if ($field !== null) { if ($field !== null) {
$this->setEntity($field); $this->setEntity($field);
} }

View file

@ -914,9 +914,8 @@ class AjaxHelper extends AppHelper {
* *
* @param array $options Option array where a callback is specified * @param array $options Option array where a callback is specified
* @return array Options with their callbacks properly set * @return array Options with their callbacks properly set
* @access protected
*/ */
function _buildCallbacks($options) { protected function _buildCallbacks($options) {
$callbacks = array(); $callbacks = array();
foreach ($this->callbacks as $callback) { foreach ($this->callbacks as $callback) {

View file

@ -95,9 +95,8 @@ class FormHelper extends AppHelper {
* $this->fieldset. * $this->fieldset.
* *
* @return Model Returns a model instance * @return Model Returns a model instance
* @access protected
*/ */
function &_introspectModel($model) { protected function &_introspectModel($model) {
$object = null; $object = null;
if (is_string($model) && strpos($model, '.') !== false) { if (is_string($model) && strpos($model, '.') !== false) {
$path = explode('.', $model); $path = explode('.', $model);
@ -140,9 +139,8 @@ class FormHelper extends AppHelper {
* Returns if a field is required to be filled based on validation properties from the validating object * Returns if a field is required to be filled based on validation properties from the validating object
* *
* @return boolean true if field is required to be filled, false otherwise * @return boolean true if field is required to be filled, false otherwise
* @access protected
*/ */
function _isRequiredField($validateProperties) { protected function _isRequiredField($validateProperties) {
$required = false; $required = false;
if (is_array($validateProperties)) { if (is_array($validateProperties)) {
@ -900,9 +898,8 @@ class FormHelper extends AppHelper {
* @param array $options The array of options you want to extract. * @param array $options The array of options you want to extract.
* @param mixed $default The default option value * @param mixed $default The default option value
* @return the contents of the option or default * @return the contents of the option or default
* @access protected
*/ */
function _extractOption($name, $options, $default = null) { protected function _extractOption($name, $options, $default = null) {
if (array_key_exists($name, $options)) { if (array_key_exists($name, $options)) {
return $options[$name]; return $options[$name];
} }
@ -914,9 +911,8 @@ class FormHelper extends AppHelper {
* *
* @param array $options Options for the label element. * @param array $options Options for the label element.
* @return string Generated label element * @return string Generated label element
* @access protected
*/ */
function _inputLabel($fieldName, $label, $options) { protected function _inputLabel($fieldName, $label, $options) {
$labelAttributes = $this->domId(array(), 'for'); $labelAttributes = $this->domId(array(), 'for');
if ($options['type'] === 'date' || $options['type'] === 'datetime') { if ($options['type'] === 'date' || $options['type'] === 'datetime') {
if (isset($options['dateFormat']) && $options['dateFormat'] === 'NONE') { if (isset($options['dateFormat']) && $options['dateFormat'] === 'NONE') {
@ -1864,9 +1860,8 @@ class FormHelper extends AppHelper {
* @param array $options * @param array $options
* @param string $key * @param string $key
* @return array * @return array
* @access protected
*/ */
function _name($options = array(), $field = null, $key = 'name') { protected function _name($options = array(), $field = null, $key = 'name') {
if ($this->requestType == 'get') { if ($this->requestType == 'get') {
if ($options === null) { if ($options === null) {
$options = array(); $options = array();
@ -2104,9 +2099,8 @@ class FormHelper extends AppHelper {
* @param string $field Name of the field to initialize options for. * @param string $field Name of the field to initialize options for.
* @param array $options Array of options to append options into. * @param array $options Array of options to append options into.
* @return array Array of options for the input. * @return array Array of options for the input.
* @access protected
*/ */
function _initInputField($field, $options = array()) { protected function _initInputField($field, $options = array()) {
if (isset($options['secure'])) { if (isset($options['secure'])) {
$secure = $options['secure']; $secure = $options['secure'];
unset($options['secure']); unset($options['secure']);

View file

@ -268,9 +268,8 @@ class JsHelper extends AppHelper {
* Generates the object string for variables passed to javascript. * Generates the object string for variables passed to javascript.
* *
* @return string Generated JSON object of all set vars * @return string Generated JSON object of all set vars
* @access protected
*/ */
function _createVars() { protected function _createVars() {
if (!empty($this->__jsVars)) { if (!empty($this->__jsVars)) {
$setVar = (strpos($this->setVariable, '.')) ? $this->setVariable : 'window.' . $this->setVariable; $setVar = (strpos($this->setVariable, '.')) ? $this->setVariable : 'window.' . $this->setVariable;
$this->buffer($setVar . ' = ' . $this->object($this->__jsVars) . ';', true); $this->buffer($setVar . ' = ' . $this->object($this->__jsVars) . ';', true);
@ -400,9 +399,8 @@ class JsHelper extends AppHelper {
* @param array $options Options to filter. * @param array $options Options to filter.
* @param array $additional Array of additional keys to extract and include in the return options array. * @param array $additional Array of additional keys to extract and include in the return options array.
* @return array Array of js options and Htmloptions * @return array Array of js options and Htmloptions
* @access protected
*/ */
function _getHtmlOptions($options, $additional = array()) { protected function _getHtmlOptions($options, $additional = array()) {
$htmlKeys = array_merge(array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title'), $additional); $htmlKeys = array_merge(array('class', 'id', 'escape', 'onblur', 'onfocus', 'rel', 'title'), $additional);
$htmlOptions = array(); $htmlOptions = array();
foreach ($htmlKeys as $key) { foreach ($htmlKeys as $key) {
@ -656,9 +654,8 @@ class JsBaseEngineHelper extends AppHelper {
* *
* @param string $string The string that needs to be utf8->hex encoded * @param string $string The string that needs to be utf8->hex encoded
* @return void * @return void
* @access protected
*/ */
function _utf8ToHex($string) { protected function _utf8ToHex($string) {
$length = strlen($string); $length = strlen($string);
$return = ''; $return = '';
for ($i = 0; $i < $length; ++$i) { for ($i = 0; $i < $length; ++$i) {
@ -972,9 +969,8 @@ class JsBaseEngineHelper extends AppHelper {
* @param array $options Options to be converted * @param array $options Options to be converted
* @param array $safeKeys Keys that should not be escaped. * @param array $safeKeys Keys that should not be escaped.
* @return string Parsed JSON options without enclosing { }. * @return string Parsed JSON options without enclosing { }.
* @access protected
*/ */
function _parseOptions($options, $safeKeys = array()) { protected function _parseOptions($options, $safeKeys = array()) {
$out = array(); $out = array();
$safeKeys = array_flip($safeKeys); $safeKeys = array_flip($safeKeys);
foreach ($options as $key => $value) { foreach ($options as $key => $value) {
@ -994,9 +990,8 @@ class JsBaseEngineHelper extends AppHelper {
* @param string $method Name of method whose options are being worked with. * @param string $method Name of method whose options are being worked with.
* @param array $options Array of options to map. * @param array $options Array of options to map.
* @return array Array of mapped options. * @return array Array of mapped options.
* @access protected
*/ */
function _mapOptions($method, $options) { protected function _mapOptions($method, $options) {
if (!isset($this->_optionMap[$method])) { if (!isset($this->_optionMap[$method])) {
return $options; return $options;
} }
@ -1017,9 +1012,8 @@ class JsBaseEngineHelper extends AppHelper {
* @param array $options Array of options being parsed * @param array $options Array of options being parsed
* @param string $callbacks Additional Keys that contain callbacks * @param string $callbacks Additional Keys that contain callbacks
* @return array Array of options with callbacks added. * @return array Array of options with callbacks added.
* @access protected
*/ */
function _prepareCallbacks($method, $options, $callbacks = array()) { protected function _prepareCallbacks($method, $options, $callbacks = array()) {
$wrapCallbacks = true; $wrapCallbacks = true;
if (isset($options['wrapCallbacks'])) { if (isset($options['wrapCallbacks'])) {
$wrapCallbacks = $options['wrapCallbacks']; $wrapCallbacks = $options['wrapCallbacks'];
@ -1054,9 +1048,8 @@ class JsBaseEngineHelper extends AppHelper {
* @param string $method Name of method processing options for. * @param string $method Name of method processing options for.
* @param array $options Array of options to process. * @param array $options Array of options to process.
* @return string Parsed options string. * @return string Parsed options string.
* @access protected
*/ */
function _processOptions($method, $options) { protected function _processOptions($method, $options) {
$options = $this->_mapOptions($method, $options); $options = $this->_mapOptions($method, $options);
$options = $this->_prepareCallbacks($method, $options); $options = $this->_prepareCallbacks($method, $options);
$options = $this->_parseOptions($options, array_keys($this->_callbackArguments[$method])); $options = $this->_parseOptions($options, array_keys($this->_callbackArguments[$method]));
@ -1068,9 +1061,8 @@ class JsBaseEngineHelper extends AppHelper {
* *
* @param array $parameters Array of parameters to convert to a query string * @param array $parameters Array of parameters to convert to a query string
* @return string Querystring fragment * @return string Querystring fragment
* @access protected
*/ */
function _toQuerystring($parameters) { protected function _toQuerystring($parameters) {
$out = ''; $out = '';
$keys = array_keys($parameters); $keys = array_keys($parameters);
$count = count($parameters); $count = count($parameters);

View file

@ -386,9 +386,8 @@ class PaginatorHelper extends AppHelper {
/** /**
* Protected method for generating prev/next links * Protected method for generating prev/next links
* *
* @access protected
*/ */
function __pagingLink($which, $title = null, $options = array(), $disabledTitle = null, $disabledOptions = array()) { protected function __pagingLink($which, $title = null, $options = array(), $disabledTitle = null, $disabledOptions = array()) {
$check = 'has' . $which; $check = 'has' . $which;
$_defaults = array( $_defaults = array(
'url' => array(), 'step' => 1, 'escape' => true, 'url' => array(), 'step' => 1, 'escape' => true,
@ -464,9 +463,8 @@ class PaginatorHelper extends AppHelper {
* @param string $model Model name to get parameters for. * @param string $model Model name to get parameters for.
* @param integer $page Page number you are checking. * @param integer $page Page number you are checking.
* @return boolean Whether model has $page * @return boolean Whether model has $page
* @access protected
*/ */
function __hasPage($model, $page) { protected function __hasPage($model, $page) {
$params = $this->params($model); $params = $this->params($model);
if (!empty($params)) { if (!empty($params)) {
if ($params["{$page}Page"] == true) { if ($params["{$page}Page"] == true) {

View file

@ -225,9 +225,8 @@ class MediaView extends View {
* Method to set headers * Method to set headers
* @param mixed $header * @param mixed $header
* @param boolean $boolean * @param boolean $boolean
* @access protected
*/ */
function _header($header, $boolean = true) { protected function _header($header, $boolean = true) {
if (is_array($header)) { if (is_array($header)) {
foreach ($header as $string => $boolean) { foreach ($header as $string => $boolean) {
if (is_numeric($string)) { if (is_numeric($string)) {
@ -244,9 +243,8 @@ class MediaView extends View {
/** /**
* Method to output headers * Method to output headers
* @access protected
*/ */
function _output() { protected function _output() {
foreach ($this->_headers as $key => $value) { foreach ($this->_headers as $key => $value) {
$header = key($value); $header = key($value);
header($header, $value[$header]); header($header, $value[$header]);

View file

@ -681,9 +681,8 @@ class View extends Object {
* @param boolean $loadHelpers Boolean to indicate that helpers should be loaded. * @param boolean $loadHelpers Boolean to indicate that helpers should be loaded.
* @param boolean $cached Whether or not to trigger the creation of a cache file. * @param boolean $cached Whether or not to trigger the creation of a cache file.
* @return string Rendered output * @return string Rendered output
* @access protected
*/ */
function _render($___viewFn, $___dataForView, $loadHelpers = true, $cached = false) { protected function _render($___viewFn, $___dataForView, $loadHelpers = true, $cached = false) {
$loadedHelpers = array(); $loadedHelpers = array();
if ($this->helpers != false && $loadHelpers === true) { if ($this->helpers != false && $loadHelpers === true) {
@ -747,9 +746,8 @@ class View extends Object {
* @param array $helpers List of helpers to load. * @param array $helpers List of helpers to load.
* @param string $parent holds name of helper, if loaded helper has helpers * @param string $parent holds name of helper, if loaded helper has helpers
* @return array Array containing the loaded helpers. * @return array Array containing the loaded helpers.
* @access protected
*/ */
function &_loadHelpers(&$loaded, $helpers, $parent = null) { protected function &_loadHelpers(&$loaded, $helpers, $parent = null) {
foreach ($helpers as $i => $helper) { foreach ($helpers as $i => $helper) {
$options = array(); $options = array();
@ -814,9 +812,8 @@ class View extends Object {
* *
* @param string $name Controller action to find template filename for * @param string $name Controller action to find template filename for
* @return string Template filename * @return string Template filename
* @access protected
*/ */
function _getViewFileName($name = null) { protected function _getViewFileName($name = null) {
$subDir = null; $subDir = null;
if (!is_null($this->subDir)) { if (!is_null($this->subDir)) {
@ -874,9 +871,8 @@ class View extends Object {
* *
* @param string $name The name of the layout to find. * @param string $name The name of the layout to find.
* @return string Filename for layout file (.ctp). * @return string Filename for layout file (.ctp).
* @access protected
*/ */
function _getLayoutFileName($name = null) { protected function _getLayoutFileName($name = null) {
if ($name === null) { if ($name === null) {
$name = $this->layout; $name = $this->layout;
} }
@ -907,9 +903,8 @@ class View extends Object {
* *
* @param string $viewFileName the filename that should exist * @param string $viewFileName the filename that should exist
* @return false * @return false
* @access protected
*/ */
function _missingView($file, $error = 'missingView') { protected function _missingView($file, $error = 'missingView') {
if ($error === 'missingView') { if ($error === 'missingView') {
$this->cakeError('missingView', array( $this->cakeError('missingView', array(
'className' => $this->name, 'className' => $this->name,
@ -934,9 +929,8 @@ class View extends Object {
* @param string $plugin Optional plugin name to scan for view files. * @param string $plugin Optional plugin name to scan for view files.
* @param boolean $cached Set to true to force a refresh of view paths. * @param boolean $cached Set to true to force a refresh of view paths.
* @return array paths * @return array paths
* @access protected
*/ */
function _paths($plugin = null, $cached = true) { protected function _paths($plugin = null, $cached = true) {
if ($plugin === null && $cached === true && !empty($this->__paths)) { if ($plugin === null && $cached === true && !empty($this->__paths)) {
return $this->__paths; return $this->__paths;
} }

View file

@ -742,9 +742,8 @@ class XmlNode extends Object {
* if given the $recursive parameter. * if given the $recursive parameter.
* *
* @param boolean $recursive Recursively delete elements. * @param boolean $recursive Recursively delete elements.
* @access protected
*/ */
function _killParent($recursive = true) { protected function _killParent($recursive = true) {
unset($this->__parent, $this->_log); unset($this->__parent, $this->_log);
if ($recursive && $this->hasChildren()) { if ($recursive && $this->hasChildren()) {
for ($i = 0; $i < count($this->children); $i++) { for ($i = 0; $i < count($this->children); $i++) {

View file

@ -82,9 +82,8 @@ class TestShellDispatcher extends ShellDispatcher {
* _initEnvironment method * _initEnvironment method
* *
* @return void * @return void
* @access protected
*/ */
function _initEnvironment() { protected function _initEnvironment() {
} }
/** /**
@ -122,9 +121,8 @@ class TestShellDispatcher extends ShellDispatcher {
* _stop method * _stop method
* *
* @return void * @return void
* @access protected
*/ */
function _stop($status = 0) { protected function _stop($status = 0) {
$this->stopped = 'Stopped with status: ' . $status; $this->stopped = 'Stopped with status: ' . $status;
return $status; return $status;
} }
@ -144,9 +142,8 @@ class TestShellDispatcher extends ShellDispatcher {
* *
* @param mixed $plugin * @param mixed $plugin
* @return mixed * @return mixed
* @access protected
*/ */
function _getShell($plugin = null) { protected function _getShell($plugin = null) {
if (isset($this->TestShell)) { if (isset($this->TestShell)) {
return $this->TestShell; return $this->TestShell;
} }

View file

@ -66,9 +66,8 @@ class TestShell extends Shell {
* *
* @param integer $status * @param integer $status
* @return void * @return void
* @access protected
*/ */
function _stop($status = 0) { protected function _stop($status = 0) {
$this->stopped = $status; $this->stopped = $status;
} }
} }

View file

@ -80,9 +80,8 @@ class ProjectTaskTest extends CakeTestCase {
* creates a test project that is used for testing project task. * creates a test project that is used for testing project task.
* *
* @return void * @return void
* @access protected
*/ */
function _setupTestProject() { protected function _setupTestProject() {
$skel = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS . 'templates' . DS . 'skel'; $skel = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS . 'templates' . DS . 'skel';
$this->Task->setReturnValueAt(0, 'in', 'y'); $this->Task->setReturnValueAt(0, 'in', 'y');
$this->Task->setReturnValueAt(1, 'in', 'n'); $this->Task->setReturnValueAt(1, 'in', 'n');

View file

@ -119,9 +119,8 @@ class TestTaskArticle extends Model {
* Example protected method * Example protected method
* *
* @return void * @return void
* @access protected
*/ */
function _innerMethod() { protected function _innerMethod() {
} }
} }

View file

@ -40,9 +40,8 @@ class TestDispatcher extends Dispatcher {
* @param mixed $params * @param mixed $params
* @param mixed $missingAction * @param mixed $missingAction
* @return void * @return void
* @access protected
*/ */
function _invoke(&$controller, $params) { protected function _invoke(&$controller, $params) {
restore_error_handler(); restore_error_handler();
if ($result = parent::_invoke($controller, $params)) { if ($result = parent::_invoke($controller, $params)) {
if ($result[0] === 'missingAction') { if ($result[0] === 'missingAction') {
@ -68,9 +67,8 @@ class TestDispatcher extends Dispatcher {
* _stop method * _stop method
* *
* @return void * @return void
* @access protected
*/ */
function _stop() { protected function _stop() {
return true; return true;
} }
} }
@ -184,9 +182,8 @@ class SomePagesController extends AppController {
* protected method * protected method
* *
* @return void * @return void
* @access protected
*/ */
function _protected() { protected function _protected() {
return true; return true;
} }

View file

@ -58,9 +58,8 @@ class CakeTestDispatcher extends Dispatcher {
* @param array $params * @param array $params
* @param boolean $missingAction * @param boolean $missingAction
* @return Controller * @return Controller
* @access protected
*/ */
function _invoke(&$controller, $params, $missingAction = false) { protected function _invoke(&$controller, $params, $missingAction = false) {
$this->controller =& $controller; $this->controller =& $controller;
if (isset($this->testCase) && method_exists($this->testCase, 'startController')) { if (isset($this->testCase) && method_exists($this->testCase, 'startController')) {
@ -682,9 +681,8 @@ class CakeTestCase extends UnitTestCase {
* Initialize DB connection. * Initialize DB connection.
* *
* @return void * @return void
* @access protected
*/ */
function _initDb() { protected function _initDb() {
$testDbAvailable = in_array('test', array_keys(ConnectionManager::enumConnectionObjects())); $testDbAvailable = in_array('test', array_keys(ConnectionManager::enumConnectionObjects()));
$_prefix = null; $_prefix = null;
@ -718,9 +716,8 @@ class CakeTestCase extends UnitTestCase {
* Load fixtures specified in public $fixtures. * Load fixtures specified in public $fixtures.
* *
* @return void * @return void
* @access protected
*/ */
function _loadFixtures() { protected function _loadFixtures() {
if (!isset($this->fixtures) || empty($this->fixtures)) { if (!isset($this->fixtures) || empty($this->fixtures)) {
return; return;
} }

View file

@ -150,9 +150,8 @@ class CakeBaseReporter extends SimpleReporter {
* but in a separate function to reduce dependancies. * but in a separate function to reduce dependancies.
* *
* @return float Time in microseconds * @return float Time in microseconds
* @access protected
*/ */
function _getTime() { protected function _getTime() {
list($usec, $sec) = explode(' ', microtime()); list($usec, $sec) = explode(' ', microtime());
return ((float)$sec + (float)$usec); return ((float)$sec + (float)$usec);
} }

View file

@ -163,9 +163,8 @@ class CakeCliReporter extends CakeBaseReporter {
* Get the time and memory stats for this test case/group * Get the time and memory stats for this test case/group
* *
* @return string String content to display * @return string String content to display
* @access protected
*/ */
function _timeStats() { protected function _timeStats() {
$out = 'Time taken by tests (in seconds): ' . $this->_timeDuration . "\n"; $out = 'Time taken by tests (in seconds): ' . $this->_timeDuration . "\n";
if (function_exists('memory_get_peak_usage')) { if (function_exists('memory_get_peak_usage')) {
$out .= 'Peak memory use: (in bytes): ' . number_format(memory_get_peak_usage()) . "\n"; $out .= 'Peak memory use: (in bytes): ' . number_format(memory_get_peak_usage()) . "\n";

View file

@ -351,9 +351,8 @@ class CakeHtmlReporter extends CakeBaseReporter {
* *
* @param string $message Plain text or Unicode message. * @param string $message Plain text or Unicode message.
* @return string Browser readable message. * @return string Browser readable message.
* @access protected
*/ */
function _htmlEntities($message) { protected function _htmlEntities($message) {
return htmlentities($message, ENT_COMPAT, $this->_characterSet); return htmlentities($message, ENT_COMPAT, $this->_characterSet);
} }
} }

View file

@ -220,9 +220,8 @@ class TestManager {
* Builds the list of test cases from a given directory * Builds the list of test cases from a given directory
* *
* @param string $directory Directory to get test case list from. * @param string $directory Directory to get test case list from.
* @access protected
*/ */
function &_getTestCaseList($directory = '.') { protected function &_getTestCaseList($directory = '.') {
$fileList =& $this->_getTestFileList($directory); $fileList =& $this->_getTestFileList($directory);
$testCases = array(); $testCases = array();
foreach ($fileList as $testCaseFile) { foreach ($fileList as $testCaseFile) {
@ -235,9 +234,8 @@ class TestManager {
* Returns a list of test files from a given directory * Returns a list of test files from a given directory
* *
* @param string $directory Directory to get test case files from. * @param string $directory Directory to get test case files from.
* @access protected
*/ */
function &_getTestFileList($directory = '.') { protected function &_getTestFileList($directory = '.') {
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestCaseFile')); $return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestCaseFile'));
return $return; return $return;
} }
@ -258,9 +256,8 @@ class TestManager {
* Returns a list of group test files from a given directory * Returns a list of group test files from a given directory
* *
* @param string $directory The directory to get group test files from. * @param string $directory The directory to get group test files from.
* @access protected
*/ */
function &_getTestGroupFileList($directory = '.') { protected function &_getTestGroupFileList($directory = '.') {
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestGroupFile')); $return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestGroupFile'));
return $return; return $return;
} }
@ -269,9 +266,8 @@ class TestManager {
* Returns a list of group test files from a given directory * Returns a list of group test files from a given directory
* *
* @param string $directory The directory to get group tests from. * @param string $directory The directory to get group tests from.
* @access protected
*/ */
function &_getTestGroupList($directory = '.') { protected function &_getTestGroupList($directory = '.') {
$fileList =& $this->_getTestGroupFileList($directory); $fileList =& $this->_getTestGroupFileList($directory);
$groupTests = array(); $groupTests = array();
@ -286,9 +282,8 @@ class TestManager {
* Returns a list of class names from a group test file * Returns a list of class names from a group test file
* *
* @param string $groupTestFile The groupTest file to scan for TestSuite classnames. * @param string $groupTestFile The groupTest file to scan for TestSuite classnames.
* @access protected
*/ */
function &_getGroupTestClassNames($groupTestFile) { protected function &_getGroupTestClassNames($groupTestFile) {
$file = implode("\n", file($groupTestFile)); $file = implode("\n", file($groupTestFile));
preg_match("~lass\s+?(.*)\s+?extends TestSuite~", $file, $matches); preg_match("~lass\s+?(.*)\s+?extends TestSuite~", $file, $matches);
if (!empty($matches)) { if (!empty($matches)) {
@ -305,9 +300,8 @@ class TestManager {
* *
* @param string $directory The directory to scan for files. * @param string $directory The directory to scan for files.
* @param mixed $fileTestFunction * @param mixed $fileTestFunction
* @access protected
*/ */
function &_getRecursiveFileList($directory = '.', $fileTestFunction) { protected function &_getRecursiveFileList($directory = '.', $fileTestFunction) {
$fileList = array(); $fileList = array();
if (!is_dir($directory)) { if (!is_dir($directory)) {
return $fileList; return $fileList;
@ -331,9 +325,8 @@ class TestManager {
* *
* @param string $file * @param string $file
* @return boolean Whether $file is a test case. * @return boolean Whether $file is a test case.
* @access protected
*/ */
function _isTestCaseFile($file) { protected function _isTestCaseFile($file) {
return $this->_hasExpectedExtension($file, $this->_testExtension); return $this->_hasExpectedExtension($file, $this->_testExtension);
} }
@ -342,9 +335,8 @@ class TestManager {
* *
* @param string $file * @param string $file
* @return boolean Whether $file is a group * @return boolean Whether $file is a group
* @access protected
*/ */
function _isTestGroupFile($file) { protected function _isTestGroupFile($file) {
return $this->_hasExpectedExtension($file, $this->_groupExtension); return $this->_hasExpectedExtension($file, $this->_groupExtension);
} }
@ -354,9 +346,8 @@ class TestManager {
* @param string $file * @param string $file
* @param string $extension * @param string $extension
* @return void * @return void
* @access protected
*/ */
function _hasExpectedExtension($file, $extension) { protected function _hasExpectedExtension($file, $extension) {
return $extension == strtolower(substr($file, (0 - strlen($extension)))); return $extension == strtolower(substr($file, (0 - strlen($extension))));
} }
@ -365,9 +356,8 @@ class TestManager {
* *
* @param string $type either 'cases' or 'groups' * @param string $type either 'cases' or 'groups'
* @return string The path tests are located on * @return string The path tests are located on
* @access protected
*/ */
function _getTestsPath($type = 'cases') { protected function _getTestsPath($type = 'cases') {
if (!empty($this->appTest)) { if (!empty($this->appTest)) {
if ($type == 'cases') { if ($type == 'cases') {
$result = APP_TEST_CASES; $result = APP_TEST_CASES;