Skip to content

Commit

Permalink
According to CakePHP conding styles, methods prefixed by _ are protec…
Browse files Browse the repository at this point in the history
…ted. Changing where it makes sense and don't break anything.
  • Loading branch information
renan committed May 30, 2011
1 parent 438050d commit ed96936
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/TemplateTask.php
Expand Up @@ -196,7 +196,7 @@ public function getThemePath() {
* @access public * @access public
* @return string filename will exit program if template is not found. * @return string filename will exit program if template is not found.
*/ */
public function _findTemplate($path, $directory, $filename) { protected function _findTemplate($path, $directory, $filename) {
$themeFile = $path . $directory . DS . $filename . '.ctp'; $themeFile = $path . $directory . DS . $filename . '.ctp';
if (file_exists($themeFile)) { if (file_exists($themeFile)) {
return $themeFile; return $themeFile;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/CakeSchema.php
Expand Up @@ -529,7 +529,7 @@ public function compare($old, $new = null) {
* where match was not found. * where match was not found.
* @access protected * @access protected
*/ */
public function _arrayDiffAssoc($array1, $array2) { protected function _arrayDiffAssoc($array1, $array2) {
$difference = array(); $difference = array();
foreach ($array1 as $key => $value) { foreach ($array1 as $key => $value) {
if (!array_key_exists($key, $array2)) { if (!array_key_exists($key, $array2)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Console/Command/ShellTest.php
Expand Up @@ -60,7 +60,7 @@ public function do_something() {


} }


public function _secret() { protected function _secret() {


} }


Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Folder.php
Expand Up @@ -215,7 +215,7 @@ public function findRecursive($pattern = '.*', $sort = false) {
* @return array Files matching pattern * @return array Files matching pattern
* @access private * @access private
*/ */
public function _findRecursive($pattern, $sort = false) { protected function _findRecursive($pattern, $sort = false) {
list($dirs, $files) = $this->read($sort); list($dirs, $files) = $this->read($sort);
$found = array(); $found = array();


Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper.php
Expand Up @@ -322,7 +322,7 @@ public function clean($output) {
* @param string $insertAfter String to be inserted after options. * @param string $insertAfter String to be inserted after options.
* @return string Composed attributes. * @return string Composed attributes.
*/ */
public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) {
if (!is_string($options)) { if (!is_string($options)) {
$options = (array) $options + array('escape' => true); $options = (array) $options + array('escape' => true);


Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -1011,7 +1011,7 @@ public function loadConfig($configFile, $path = null) {
* @param string $insertAfter String to be inserted after options. * @param string $insertAfter String to be inserted after options.
* @return string Composed attributes. * @return string Composed attributes.
*/ */
public function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) {
if (is_array($options)) { if (is_array($options)) {
$options = array_merge(array('escape' => true), $options); $options = array_merge(array('escape' => true), $options);


Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/JqueryEngineHelper.php
Expand Up @@ -122,7 +122,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
* @param string $callbacks Array of callback / special options. * @param string $callbacks Array of callback / special options.
* @return string Composed method string * @return string Composed method string
*/ */
public function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) { protected function _methodTemplate($method, $template, $options, $extraSafeKeys = array()) {
$options = $this->_mapOptions($method, $options); $options = $this->_mapOptions($method, $options);
$options = $this->_prepareCallbacks($method, $options); $options = $this->_prepareCallbacks($method, $options);
$callbacks = array_keys($this->_callbackArguments[$method]); $callbacks = array_keys($this->_callbackArguments[$method]);
Expand Down

0 comments on commit ed96936

Please sign in to comment.