Browse Source

Added visibility in some methods and attributes.

Juan Basso 14 years ago
parent
commit
0575e92833

+ 1 - 1
lib/Cake/Console/Shell.php

@@ -142,7 +142,7 @@ class Shell extends Object {
  * @param ConsoleOutput $stderr A ConsoleOutput object for stderr.
  * @param ConsoleInput $stdin A ConsoleInput object for stdin.
  */
-	function __construct($stdout = null, $stderr = null, $stdin = null) {
+	public function __construct($stdout = null, $stderr = null, $stdin = null) {
 		if ($this->name == null) {
 			$this->name = Inflector::camelize(str_replace(array('Shell', 'Task'), '', get_class($this)));
 		}

+ 1 - 1
lib/Cake/Controller/Component/AclComponent.php

@@ -263,7 +263,7 @@ class DbAcl extends Object implements AclInterface {
  * Constructor
  *
  */
-	function __construct() {
+	public function __construct() {
 		parent::__construct();
 		App::uses('AclNode', 'Model');
 		$this->Aro = ClassRegistry::init(array('class' => 'Aro', 'alias' => 'Aro'));

+ 1 - 1
lib/Cake/Controller/Component/Auth/BasicAuthenticate.php

@@ -27,7 +27,7 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth');
  *
  * In your controller's components array, add auth + the required settings.
  * {{{
- *	var $components = array(
+ *	public $components = array(
  *		'Auth' => array(
  *			'authenticate' => array('Basic')
  *		)

+ 1 - 1
lib/Cake/Controller/Component/Auth/DigestAuthenticate.php

@@ -30,7 +30,7 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth');
  *
  * In your controller's components array, add auth + the required settings.
  * {{{
- *	var $components = array(
+ *	public $components = array(
  *		'Auth' => array(
  *			'authenticate' => array('Digest')
  *		)

+ 1 - 1
lib/Cake/Controller/Component/EmailComponent.php

@@ -98,7 +98,7 @@ class EmailComponent extends Component {
  *
  * @var string
  */
-	var $date = null;
+	public $date = null;
 
 /**
  * The subject of the email

+ 1 - 1
lib/Cake/Controller/Component/RequestHandlerComponent.php

@@ -90,7 +90,7 @@ class RequestHandlerComponent extends Component {
  * @param ComponentCollection $collection ComponentCollection object.
  * @param array $settings Array of settings.
  */
-	function __construct(ComponentCollection $collection, $settings = array()) {
+	public function __construct(ComponentCollection $collection, $settings = array()) {
 		$this->addInputType('xml', array(array($this, '_convertXml')));
 		parent::__construct($collection, $settings);
 	}

+ 1 - 1
lib/Cake/Log/Engine/FileLog.php

@@ -43,7 +43,7 @@ class FileLog implements CakeLogInterface {
  *
  * @param array $options Options for the FileLog, see above.
  */
-	function __construct($options = array()) {
+	public function __construct($options = array()) {
 		$options += array('path' => LOGS);
 		$this->_path = $options['path'];
 	}

+ 1 - 1
lib/Cake/Model/Datasource/Database/Postgres.php

@@ -299,7 +299,7 @@ class Postgres extends DboSource {
  *						and if 1, sequences are not modified
  * @return boolean	SQL TRUNCATE TABLE statement, false if not applicable.
  */
-	function truncate($table, $reset = 0) {
+	public function truncate($table, $reset = 0) {
 		$table = $this->fullTableName($table, false);
 		if (!isset($this->_sequenceMap[$table])) {
 			$cache = $this->cacheSources;

+ 6 - 6
lib/Cake/Model/Datasource/Database/Sqlite.php

@@ -33,28 +33,28 @@ class Sqlite extends DboSource {
  *
  * @var string
  */
-	var $description = "SQLite DBO Driver";
+	public $description = "SQLite DBO Driver";
 
 /**
  * Quote Start
  *
  * @var string
  */
-	var $startQuote = '"';
+	public $startQuote = '"';
 
 /**
  * Quote End
  *
  * @var string
  */
-	var $endQuote = '"';
+	public $endQuote = '"';
 
 /**
  * Base configuration settings for SQLite3 driver
  *
  * @var array
  */
-	var $_baseConfig = array(
+	protected $_baseConfig = array(
 		'persistent' => false,
 		'database' => null
 	);
@@ -64,7 +64,7 @@ class Sqlite extends DboSource {
  *
  * @var array
  */
-	var $columns = array(
+	public $columns = array(
 		'primary_key' => array('name' => 'integer primary key autoincrement'),
 		'string' => array('name' => 'varchar', 'limit' => '255'),
 		'text' => array('name' => 'text'),
@@ -83,7 +83,7 @@ class Sqlite extends DboSource {
  *
  * @var array
  */
-	var $fieldParameters = array(
+	public $fieldParameters = array(
 		'collate' => array(
 			'value' => 'COLLATE',
 			'quote' => false,

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

@@ -47,7 +47,7 @@
  * than a normal behavior mixin method.
  *
  * {{{
- * var $mapMethods = array('/do(\w+)/' => 'doSomething');
+ * public $mapMethods = array('/do(\w+)/' => 'doSomething');
  *
  * function doSomething($model, $method, $arg1, $arg2) {
  *		//do something

+ 1 - 1
lib/Cake/Network/Http/HttpResponse.php

@@ -431,7 +431,7 @@ class HttpResponse implements ArrayAccess {
  *
  * @return string
  */
-	function __toString() {
+	public function __toString() {
 		return $this->body();
 	}
 

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

@@ -336,7 +336,7 @@ class Validation {
  * @see Validation::date
  * @see Validation::time
  */
-	function datetime($check, $dateFormat = 'ymd', $regex = null) {
+	public function datetime($check, $dateFormat = 'ymd', $regex = null) {
 		$valid = false;
 		$parts = explode(' ', $check);
 		if (!empty($parts) && count($parts) > 1) {

+ 7 - 7
lib/Cake/View/Helper/CacheHelper.php

@@ -47,6 +47,13 @@ class CacheHelper extends AppHelper {
 	protected $_match = array();
 
 /**
+ * Counter used for counting nocache section tags.
+ *
+ * @var integer
+ */
+	protected $_counter = 0;
+
+/**
  * Parses the view file and stores content for cache file building.
  *
  * @param string $viewFile
@@ -74,13 +81,6 @@ class CacheHelper extends AppHelper {
 	}
 
 /**
- * Counter used for counting nocache section tags.
- *
- * @var integer
- */
-	var $_counter = 0;
-
-/**
  * Main method used to cache a view
  *
  * @param string $file File to cache

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

@@ -2203,7 +2203,7 @@ class FormHelper extends AppHelper {
  * @param boolean $setScope Sets the view scope to the model specified in $tagValue
  * @return void
  */
-	function setEntity($entity, $setScope = false) {
+	public function setEntity($entity, $setScope = false) {
 		parent::setEntity($entity, $setScope);
 		$parts = explode('.', $entity);
 		$field = $this->_introspectModel($this->_modelScope, 'fields', $parts[0]);

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

@@ -65,7 +65,7 @@ abstract class JsBaseEngineHelper extends AppHelper {
  * @param View $View
  * @param array $settings
  */
-	function __construct($View, $settings = array()) {
+	public function __construct($View, $settings = array()) {
 		parent::__construct($View, $settings);
 	}
 

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

@@ -94,7 +94,7 @@ class PaginatorHelper extends AppHelper {
  * @param array $settings Array of settings.
  * @throws CakeException When the AjaxProvider helper does not implement a link method.
  */
-	function __construct(View $View, $settings = array()) {
+	public function __construct(View $View, $settings = array()) {
 		$ajaxProvider = isset($settings['ajax']) ? $settings['ajax'] : 'Js';
 		$this->helpers[] = $ajaxProvider;
 		$this->_ajaxHelperClass = $ajaxProvider;