Browse Source

According to CakePHP conding styles, methods prefixed by _ are protected. Changing where it makes sense and don't break anything.

Renan Gonçalves 15 years ago
parent
commit
ed96936ea7

+ 1 - 1
lib/Cake/Console/Command/Task/TemplateTask.php

@@ -196,7 +196,7 @@ class TemplateTask extends Shell {
  * @access public
  * @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';
 		if (file_exists($themeFile)) {
 			return $themeFile;

+ 1 - 1
lib/Cake/Model/CakeSchema.php

@@ -529,7 +529,7 @@ class CakeSchema extends Object {
  *     where match was not found.
  * @access protected
  */
-	public function _arrayDiffAssoc($array1, $array2) {
+	protected function _arrayDiffAssoc($array1, $array2) {
 		$difference = array();
 		foreach ($array1 as $key => $value) {
 			if (!array_key_exists($key, $array2)) {

+ 1 - 1
lib/Cake/Test/Case/Console/Command/ShellTest.php

@@ -60,7 +60,7 @@ class ShellTestShell extends Shell {
 
 	}
 
-	public function _secret() {
+	protected function _secret() {
 
 	}
 

+ 1 - 1
lib/Cake/Utility/Folder.php

@@ -215,7 +215,7 @@ class Folder {
  * @return array Files matching pattern
  * @access private
  */
-	public function _findRecursive($pattern, $sort = false) {
+	protected function _findRecursive($pattern, $sort = false) {
 		list($dirs, $files) = $this->read($sort);
 		$found = array();
 

+ 1 - 1
lib/Cake/View/Helper.php

@@ -322,7 +322,7 @@ class Helper extends Object {
  * @param string $insertAfter String to be inserted after options.
  * @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)) {
 			$options = (array) $options + array('escape' => true);
 

+ 1 - 1
lib/Cake/View/Helper/HtmlHelper.php

@@ -1011,7 +1011,7 @@ class HtmlHelper extends AppHelper {
  * @param string $insertAfter String to be inserted after options.
  * @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)) {
 			$options = array_merge(array('escape' => true), $options);
 

+ 1 - 1
lib/Cake/View/Helper/JqueryEngineHelper.php

@@ -122,7 +122,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper {
  * @param string $callbacks Array of callback / special options.
  * @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->_prepareCallbacks($method, $options);
 		$callbacks = array_keys($this->_callbackArguments[$method]);