Skip to content
This repository
Browse code

Adding proper visibility keywords for class functions

  • Loading branch information...
commit 4c042ae1330d66bc310a1ef8b174a4af8c7f3e57 1 parent e5f2f6a
ADmad authored May 29, 2011

Showing 34 changed files with 209 additions and 210 deletions. Show diff stats Hide diff stats

  1. 4  lib/Cake/Controller/CakeErrorController.php
  2. 12  lib/Cake/Controller/Component.php
  3. 12  lib/Cake/Controller/Scaffold.php
  4. 2  lib/Cake/Core/Configure.php
  5. 4  lib/Cake/Core/Object.php
  6. 2  lib/Cake/Error/ExceptionRenderer.php
  7. 2  lib/Cake/I18n/I18n.php
  8. 10  lib/Cake/I18n/L10n.php
  9. 2  lib/Cake/Model/AclNode.php
  10. 8  lib/Cake/Model/Behavior/TranslateBehavior.php
  11. 10  lib/Cake/Model/Behavior/TreeBehavior.php
  12. 8  lib/Cake/Model/BehaviorCollection.php
  13. 10  lib/Cake/Model/CakeSchema.php
  14. 4  lib/Cake/Model/Datasource/DataSource.php
  15. 32  lib/Cake/Model/Datasource/Database/Mysql.php
  16. 40  lib/Cake/Model/Datasource/Database/Oracle.php
  17. 50  lib/Cake/Model/Datasource/Database/Postgres.php
  18. 34  lib/Cake/Model/Datasource/Database/Sqlite.php
  19. 28  lib/Cake/Model/Datasource/DboSource.php
  20. 4  lib/Cake/Model/Datasource/Session/DatabaseSession.php
  21. 71  lib/Cake/Model/Model.php
  22. 18  lib/Cake/Model/ModelBehavior.php
  23. 2  lib/Cake/Model/Permission.php
  24. 4  lib/Cake/Network/CakeSocket.php
  25. 2  lib/Cake/Network/Email/SmtpTransport.php
  26. 2  lib/Cake/Network/Http/HttpResponse.php
  27. 2  lib/Cake/Utility/Debugger.php
  28. 6  lib/Cake/Utility/File.php
  29. 8  lib/Cake/Utility/Folder.php
  30. 2  lib/Cake/Utility/Security.php
  31. 12  lib/Cake/View/Helper.php
  32. 4  lib/Cake/View/MediaView.php
  33. 4  lib/Cake/View/ThemeView.php
  34. 4  lib/Cake/View/View.php
4  lib/Cake/Controller/CakeErrorController.php
@@ -22,7 +22,7 @@ class CakeErrorController extends AppController {
22 22
  * @access public
23 23
  * @return void
24 24
  */
25  
-	function __construct($request = null) {
  25
+	public function __construct($request = null) {
26 26
 		parent::__construct($request);
27 27
 		$this->constructClasses();
28 28
 		$this->Components->trigger('initialize', array(&$this));
@@ -34,7 +34,7 @@ function __construct($request = null) {
34 34
  *
35 35
  * @return void
36 36
  */
37  
-	function beforeRender() {
  37
+	public function beforeRender() {
38 38
 		parent::beforeRender();
39 39
 		foreach ($this->viewVars as $key => $value) {
40 40
 			if (!is_object($value)){
12  lib/Cake/Controller/Component.php
@@ -19,7 +19,7 @@
19 19
 
20 20
 /**
21 21
  * Base class for an individual Component.  Components provide resuable bits of
22  
- * controller logic that can be composed into a controller.  Components also 
  22
+ * controller logic that can be composed into a controller.  Components also
23 23
  * provide request life-cycle callbacks for injecting logic at specific points.
24 24
  *
25 25
  * ## Life cycle callbacks
@@ -30,8 +30,8 @@
30 30
  * - `initialize()` - Fired before the controller's beforeFilter method.
31 31
  * - `startup()` - Fired after the controller's beforeFilter method.
32 32
  * - `beforeRender()` - Fired before the view + layout are rendered.
33  
- * - `shutdown()` - Fired after the action is complete and the view has been rendered 
34  
- *    but before Controller::afterFilter(). 
  33
+ * - `shutdown()` - Fired after the action is complete and the view has been rendered
  34
+ *    but before Controller::afterFilter().
35 35
  * - `beforeRedirect()` - Fired before a redirect() is done.
36 36
  *
37 37
  * @package       cake.libs.controller
@@ -132,18 +132,18 @@ public function beforeRender($controller) { }
132 132
  * @param object $controller Controller with components to shutdown
133 133
  * @return void
134 134
  */
135  
-	function shutdown($controller) { }
  135
+	public function shutdown($controller) { }
136 136
 
137 137
 /**
138 138
  * Called before Controller::redirect().  Allows you to replace the url that will
139 139
  * be redirected to with a new url. The return of this method can either be an array or a string.
140 140
  *
141 141
  * If the return is an array and contains a 'url' key.  You may also supply the following:
142  
- * 
  142
+ *
143 143
  * - `status` The status code for the redirect
144 144
  * - `exit` Whether or not the redirect should exit.
145 145
  *
146  
- * If your response is a string or an array that does not contain a 'url' key it will 
  146
+ * If your response is a string or an array that does not contain a 'url' key it will
147 147
  * be used as the new url to redirect to.
148 148
  *
149 149
  * @param object $controller Controller with components to beforeRedirect
12  lib/Cake/Controller/Scaffold.php
@@ -106,7 +106,7 @@ class Scaffold {
106 106
  * @param Controller $controller Controller to scaffold
107 107
  * @param CakeRequest $request Request parameters.
108 108
  */
109  
-	function __construct(Controller $controller, CakeRequest $request) {
  109
+	public function __construct(Controller $controller, CakeRequest $request) {
110 110
 		$this->controller = $controller;
111 111
 
112 112
 		$count = count($this->__passedVars);
@@ -254,7 +254,7 @@ protected function _scaffoldSave(CakeRequest $request, $action = 'edit') {
254 254
 
255 255
 				if ($this->ScaffoldModel->save($request->data)) {
256 256
 					if ($this->controller->_afterScaffoldSave($action)) {
257  
-						$message = __d('cake', 
  257
+						$message = __d('cake',
258 258
 							'The %1$s has been %2$s',
259 259
 							Inflector::humanize($this->modelKey),
260 260
 							$success
@@ -318,9 +318,9 @@ protected function _scaffoldDelete(CakeRequest $request) {
318 318
 				$message = __d('cake', 'The %1$s with id: %2$d has been deleted.', Inflector::humanize($this->modelClass), $id);
319 319
 				return $this->_sendMessage($message);
320 320
 			} else {
321  
-				$message = __d('cake', 
322  
-					'There was an error deleting the %1$s with id: %2$d', 
323  
-					Inflector::humanize($this->modelClass), 
  321
+				$message = __d('cake',
  322
+					'There was an error deleting the %1$s with id: %2$d',
  323
+					Inflector::humanize($this->modelClass),
324 324
 					$id
325 325
 				);
326 326
 				return $this->_sendMessage($message);
@@ -331,7 +331,7 @@ protected function _scaffoldDelete(CakeRequest $request) {
331 331
 	}
332 332
 
333 333
 /**
334  
- * Sends a message to the user.  Either uses Sessions or flash messages depending 
  334
+ * Sends a message to the user.  Either uses Sessions or flash messages depending
335 335
  * on the availability of a session
336 336
  *
337 337
  * @param string $message Message to display
2  lib/Cake/Core/Configure.php
@@ -372,5 +372,5 @@ public static function restore($name, $cacheConfig = 'default') {
372 372
  * @param string $key
373 373
  * @return array An array of data to merge into the runtime configuration
374 374
  */
375  
-	function read($key);
  375
+	public function read($key);
376 376
 }
4  lib/Cake/Core/Object.php
@@ -177,7 +177,7 @@ protected function _set($properties = array()) {
177 177
  * @access protected
178 178
  * @todo add examples to manual
179 179
  */
180  
-	function _persist($name, $return = null, &$object, $type = null) {
  180
+	protected function _persist($name, $return = null, &$object, $type = null) {
181 181
 		$file = CACHE . 'persistent' . DS . strtolower($name) . '.php';
182 182
 		if ($return === null) {
183 183
 			if (!file_exists($file)) {
@@ -256,7 +256,7 @@ protected function _savePersistent($name, &$object) {
256 256
  * @return void
257 257
  * @access private
258 258
  */
259  
-	function __openPersistent($name, $type = null) {
  259
+	private function __openPersistent($name, $type = null) {
260 260
 		$file = CACHE . 'persistent' . DS . strtolower($name) . '.php';
261 261
 		include($file);
262 262
 
2  lib/Cake/Error/ExceptionRenderer.php
@@ -89,7 +89,7 @@ class ExceptionRenderer {
89 89
  * @param string $method Method producing the error
90 90
  * @param array $messages Error messages
91 91
  */
92  
-	function __construct(Exception $exception) {
  92
+	public function __construct(Exception $exception) {
93 93
 		$this->controller = $this->_getController($exception);
94 94
 
95 95
 		if (method_exists($this->controller, 'apperror')) {
2  lib/Cake/I18n/I18n.php
@@ -558,7 +558,7 @@ private function __parseLiteralValue($string) {
558 558
  * @param string $domain Domain where format is stored
559 559
  * @return mixed translated format string if only value or array of translated strings for corresponding format.
560 560
  */
561  
-	function __translateTime($format, $domain) {
  561
+	private function __translateTime($format, $domain) {
562 562
 		if (!empty($this->__domains[$domain][$this->__lang]['LC_TIME'][$format])) {
563 563
 			if (($trans = $this->__domains[$domain][$this->__lang][$this->category][$format])) {
564 564
 				return $trans;
10  lib/Cake/I18n/L10n.php
@@ -328,7 +328,7 @@ class L10n {
328 328
 /**
329 329
  * Class constructor
330 330
  */
331  
-	function __construct() {
  331
+	public function __construct() {
332 332
 		if (defined('DEFAULT_LANGUAGE')) {
333 333
 			$this->default = DEFAULT_LANGUAGE;
334 334
 		}
@@ -356,7 +356,7 @@ public function get($language = null) {
356 356
  * @param string $language Language (if null will use DEFAULT_LANGUAGE if defined)
357 357
  * @access private
358 358
  */
359  
-	function __setLanguage($language = null) {
  359
+	private function __setLanguage($language = null) {
360 360
 		$langKey = null;
361 361
 		if ($language !== null && isset($this->__l10nMap[$language]) && isset($this->__l10nCatalog[$this->__l10nMap[$language]])) {
362 362
 			$langKey = $this->__l10nMap[$language];
@@ -405,7 +405,7 @@ function __setLanguage($language = null) {
405 405
  * @return boolean Success
406 406
  * @access private
407 407
  */
408  
-	function __autoLanguage() {
  408
+	private function __autoLanguage() {
409 409
 		$_detectableLanguages = CakeRequest::acceptLanguage();
410 410
 		foreach ($_detectableLanguages as $key => $langKey) {
411 411
 			if (isset($this->__l10nCatalog[$langKey])) {
@@ -426,7 +426,7 @@ function __autoLanguage() {
426 426
  * Attempts to find locale for language, or language for locale
427 427
  *
428 428
  * @param mixed $mixed 2/3 char string (language/locale), array of those strings, or null
429  
- * @return mixed string language/locale, array of those values, whole map as an array, 
  429
+ * @return mixed string language/locale, array of those values, whole map as an array,
430 430
  *    or false when language/locale doesn't exist
431 431
  */
432 432
 	public function map($mixed = null) {
@@ -453,7 +453,7 @@ public function map($mixed = null) {
453 453
  * Attempts to find catalog record for requested language
454 454
  *
455 455
  * @param mixed $language string requested language, array of requested languages, or null for whole catalog
456  
- * @return mixed array catalog record for requested language, array of catalog records, whole catalog, 
  456
+ * @return mixed array catalog record for requested language, array of catalog records, whole catalog,
457 457
  *    or false when language doesn't exist
458 458
  */
459 459
 	public function catalog($language = null) {
2  lib/Cake/Model/AclNode.php
@@ -49,7 +49,7 @@ class AclNode extends AppModel {
49 49
  * Constructor
50 50
  *
51 51
  */
52  
-	function __construct() {
  52
+	public function __construct() {
53 53
 		$config = Configure::read('Acl.database');
54 54
 		if (isset($config)) {
55 55
 			$this->useDbConfig = $config;
8  lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -29,7 +29,7 @@ class TranslateBehavior extends ModelBehavior {
29 29
 
30 30
 /**
31 31
  * Used for runtime configuration of model
32  
- * 
  32
+ *
33 33
  * @var array
34 34
  */
35 35
 	public $runtime = array();
@@ -381,7 +381,7 @@ public function translateModel($model) {
381 381
  * @param boolean $reset
382 382
  * @return bool
383 383
  */
384  
-	function bindTranslation($model, $fields, $reset = true) {
  384
+	public function bindTranslation($model, $fields, $reset = true) {
385 385
 		if (is_string($fields)) {
386 386
 			$fields = array($fields);
387 387
 		}
@@ -450,11 +450,11 @@ function bindTranslation($model, $fields, $reset = true) {
450 450
  * fake field
451 451
  *
452 452
  * @param object $model instance of model
453  
- * @param mixed $fields string with field, or array(field1, field2=>AssocName, field3), or null for 
  453
+ * @param mixed $fields string with field, or array(field1, field2=>AssocName, field3), or null for
454 454
  *    unbind all original translations
455 455
  * @return bool
456 456
  */
457  
-	function unbindTranslation($model, $fields = null) {
  457
+	public function unbindTranslation($model, $fields = null) {
458 458
 		if (empty($fields) && empty($this->settings[$model->alias])) {
459 459
 			return false;
460 460
 		}
10  lib/Cake/Model/Behavior/TreeBehavior.php
@@ -632,7 +632,7 @@ public function recover($Model, $mode = 'parent', $missingParentAction = null) {
632 632
  * @link http://book.cakephp.org/view/1355/reorder
633 633
  * @link http://book.cakephp.org/view/1629/Reorder
634 634
  */
635  
-	function reorder($Model, $options = array()) {
  635
+	public function reorder($Model, $options = array()) {
636 636
 		$options = array_merge(array('id' => null, 'field' => $Model->displayField, 'order' => 'ASC', 'verify' => true), $options);
637 637
 		extract($options);
638 638
 		if ($verify && !$this->verify($Model)) {
@@ -702,7 +702,7 @@ public function removeFromTree($Model, $id = null, $delete = false) {
702 702
 
703 703
 		$db = ConnectionManager::getDataSource($Model->useDbConfig);
704 704
 		$Model->updateAll(
705  
-			array($parent => $db->value($node[$parent], $parent)), 
  705
+			array($parent => $db->value($node[$parent], $parent)),
706 706
 			array($Model->escapeField($parent) => $node[$Model->primaryKey])
707 707
 		);
708 708
 		$this->__sync($Model, 1, '-', 'BETWEEN ' . ($node[$left] + 1) . ' AND ' . ($node[$right] - 1));
@@ -885,7 +885,7 @@ protected function _setParent($Model, $parentId = null, $created = false) {
885 885
  * @return int
886 886
  * @access private
887 887
  */
888  
-	function __getMax($Model, $scope, $right, $recursive = -1, $created = false) {
  888
+	private function __getMax($Model, $scope, $right, $recursive = -1, $created = false) {
889 889
 		$db = ConnectionManager::getDataSource($Model->useDbConfig);
890 890
 		if ($created) {
891 891
 			if (is_string($scope)) {
@@ -913,7 +913,7 @@ function __getMax($Model, $scope, $right, $recursive = -1, $created = false) {
913 913
  * @return int
914 914
  * @access private
915 915
  */
916  
-	function __getMin($Model, $scope, $left, $recursive = -1) {
  916
+	private function __getMin($Model, $scope, $left, $recursive = -1) {
917 917
 		$db = ConnectionManager::getDataSource($Model->useDbConfig);
918 918
 		$name = $Model->alias . '.' . $left;
919 919
 		list($edge) = array_values($Model->find('first', array(
@@ -936,7 +936,7 @@ function __getMin($Model, $scope, $left, $recursive = -1) {
936 936
  * @param string $field
937 937
  * @access private
938 938
  */
939  
-	function __sync($Model, $shift, $dir = '+', $conditions = array(), $created = false, $field = 'both') {
  939
+	private function __sync($Model, $shift, $dir = '+', $conditions = array(), $created = false, $field = 'both') {
940 940
 		$ModelRecursive = $Model->recursive;
941 941
 		extract($this->settings[$Model->alias]);
942 942
 		$Model->recursive = $recursive;
8  lib/Cake/Model/BehaviorCollection.php
@@ -59,7 +59,7 @@ class BehaviorCollection extends ObjectCollection {
59 59
  * @access public
60 60
  * @return void
61 61
  */
62  
-	function init($modelName, $behaviors = array()) {
  62
+	public function init($modelName, $behaviors = array()) {
63 63
 		$this->modelName = $modelName;
64 64
 
65 65
 		if (!empty($behaviors)) {
@@ -206,7 +206,7 @@ public function detach($name) {
206 206
 /**
207 207
  * Dispatches a behavior method.  Will call either normal methods or mapped methods.
208 208
  *
209  
- * If a method is not handeled by the BehaviorCollection, and $strict is false, a 
  209
+ * If a method is not handeled by the BehaviorCollection, and $strict is false, a
210 210
  * special return of `array('unhandled')` will be returned to signal the method was not found.
211 211
  *
212 212
  * @param Model $model The model the method was originally called on.
@@ -217,7 +217,7 @@ public function detach($name) {
217 217
  */
218 218
 	public function dispatchMethod($model, $method, $params = array(), $strict = false) {
219 219
 		$method = $this->hasMethod($method, true);
220  
-		
  220
+
221 221
 		if ($strict && empty($method)) {
222 222
 			trigger_error(__d('cake_dev', "BehaviorCollection::dispatchMethod() - Method %s not found in any attached behavior", $method), E_USER_WARNING);
223 223
 			return null;
@@ -236,7 +236,7 @@ public function dispatchMethod($model, $method, $params = array(), $strict = fal
236 236
 	}
237 237
 
238 238
 /**
239  
- * Gets the method list for attached behaviors, i.e. all public, non-callback methods. 
  239
+ * Gets the method list for attached behaviors, i.e. all public, non-callback methods.
240 240
  * This does not include mappedMethods.
241 241
  *
242 242
  * @return array All public methods for all behaviors attached to this collection
10  lib/Cake/Model/CakeSchema.php
@@ -79,7 +79,7 @@ class CakeSchema extends Object {
79 79
  *
80 80
  * @param array $options optional load object properties
81 81
  */
82  
-	function __construct($options = array()) {
  82
+	public function __construct($options = array()) {
83 83
 		parent::__construct();
84 84
 
85 85
 		if (empty($options['name'])) {
@@ -391,7 +391,7 @@ public function write($object, $options = array()) {
391 391
  * @param array $fields Array of field information to generate the table with.
392 392
  * @return string Variable declaration for a schema class
393 393
  */
394  
-	function generateTable($table, $fields) {
  394
+	public function generateTable($table, $fields) {
395 395
 		$out = "\tvar \${$table} = array(\n";
396 396
 		if (is_array($fields)) {
397 397
 			$cols = array();
@@ -529,7 +529,7 @@ public function compare($old, $new = null) {
529 529
  *     where match was not found.
530 530
  * @access protected
531 531
  */
532  
-	function _arrayDiffAssoc($array1, $array2) {
  532
+	public function _arrayDiffAssoc($array1, $array2) {
533 533
 		$difference = array();
534 534
 		foreach ($array1 as $key => $value) {
535 535
 			if (!array_key_exists($key, $array2)) {
@@ -626,7 +626,7 @@ public function __columns(&$Obj) {
626 626
  * @param array $old Old indexes
627 627
  * @return mixed False on failure, or an array of parameters to add & drop.
628 628
  */
629  
-	function _compareTableParameters($new, $old) {
  629
+	protected function _compareTableParameters($new, $old) {
630 630
 		if (!is_array($new) || !is_array($old)) {
631 631
 			return false;
632 632
 		}
@@ -641,7 +641,7 @@ function _compareTableParameters($new, $old) {
641 641
  * @param array $old Old indexes
642 642
  * @return mixed false on failure or array of indexes to add and drop
643 643
  */
644  
-	function _compareIndexes($new, $old) {
  644
+	protected function _compareIndexes($new, $old) {
645 645
 		if (!is_array($new) || !is_array($old)) {
646 646
 			return false;
647 647
 		}
4  lib/Cake/Model/Datasource/DataSource.php
@@ -87,7 +87,7 @@ class DataSource extends Object {
87 87
  * @param array $config Array of configuration information for the datasource.
88 88
  * @return void.
89 89
  */
90  
-	function __construct($config = array()) {
  90
+	public function __construct($config = array()) {
91 91
 		parent::__construct();
92 92
 		$this->setConfig($config);
93 93
 	}
@@ -329,7 +329,7 @@ function __cacheDescription($object, $data = null) {
329 329
  * @access public
330 330
  * @todo Remove and refactor $assocData, ensure uses of the method have the param removed too.
331 331
  */
332  
-	function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) {
  332
+	public function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) {
333 333
 		$keys = array('{$__cakeID__$}', '{$__cakeForeignKey__$}');
334 334
 
335 335
 		foreach ($keys as $key) {
32  lib/Cake/Model/Datasource/Database/Mysql.php
@@ -138,7 +138,7 @@ class Mysql extends DboSource {
138 138
  *
139 139
  * @return boolean True if the database could be connected, else false
140 140
  */
141  
-	function connect() {
  141
+	public function connect() {
142 142
 		$config = $this->config;
143 143
 		$this->connected = false;
144 144
 		try {
@@ -170,7 +170,7 @@ function connect() {
170 170
  *
171 171
  * @return boolean
172 172
  */
173  
-	function enabled() {
  173
+	public function enabled() {
174 174
 		return in_array('mysql', PDO::getAvailableDrivers());
175 175
 	}
176 176
 
@@ -179,7 +179,7 @@ function enabled() {
179 179
  *
180 180
  * @return array Array of tablenames in the database
181 181
  */
182  
-	function listSources($data = null) {
  182
+	public function listSources($data = null) {
183 183
 		$cache = parent::listSources();
184 184
 		if ($cache != null) {
185 185
 			return $cache;
@@ -207,7 +207,7 @@ function listSources($data = null) {
207 207
  *
208 208
  * @param PDOStatement $results
209 209
  */
210  
-	function resultSet($results) {
  210
+	public function resultSet($results) {
211 211
 		$this->map = array();
212 212
 		$numFields = $results->columnCount();
213 213
 		$index = 0;
@@ -232,7 +232,7 @@ function resultSet($results) {
232 232
  *
233 233
  * @return mixed array with results fetched and mapped to column names or false if there is no results left to fetch
234 234
  */
235  
-	function fetchResult() {
  235
+	public function fetchResult() {
236 236
 		if ($row = $this->_result->fetch()) {
237 237
 			$resultRow = array();
238 238
 			foreach ($this->map as $col => $meta) {
@@ -290,7 +290,7 @@ public function getCharsetName($name) {
290 290
  * @param mixed $tableName Name of database table to inspect or model instance
291 291
  * @return array Fields in table. Keys are name and type
292 292
  */
293  
-	function describe($model) {
  293
+	public function describe($model) {
294 294
 		$cache = parent::describe($model);
295 295
 		if ($cache != null) {
296 296
 			return $cache;
@@ -337,7 +337,7 @@ function describe($model) {
337 337
  * @param mixed $conditions
338 338
  * @return array
339 339
  */
340  
-	function update($model, $fields = array(), $values = null, $conditions = null) {
  340
+	public function update($model, $fields = array(), $values = null, $conditions = null) {
341 341
 		if (!$this->_useAlias) {
342 342
 			return parent::update($model, $fields, $values, $conditions);
343 343
 		}
@@ -379,7 +379,7 @@ function update($model, $fields = array(), $values = null, $conditions = null) {
379 379
  * @param mixed $conditions
380 380
  * @return boolean Success
381 381
  */
382  
-	function delete($model, $conditions = null) {
  382
+	public function delete($model, $conditions = null) {
383 383
 		if (!$this->_useAlias) {
384 384
 			return parent::delete($model, $conditions);
385 385
 		}
@@ -417,7 +417,7 @@ function delete($model, $conditions = null) {
417 417
  *
418 418
  * @param string $enc Database encoding
419 419
  */
420  
-	function setEncoding($enc) {
  420
+	public function setEncoding($enc) {
421 421
 		return $this->_execute('SET NAMES ' . $enc) !== false;
422 422
 	}
423 423
 
@@ -427,7 +427,7 @@ function setEncoding($enc) {
427 427
  * @param string $model Name of model to inspect
428 428
  * @return array Fields in table. Keys are column and unique
429 429
  */
430  
-	function index($model) {
  430
+	public function index($model) {
431 431
 		$index = array();
432 432
 		$table = $this->fullTableName($model);
433 433
 		$old = version_compare($this->getVersion(), '4.1', '<=');
@@ -460,7 +460,7 @@ function index($model) {
460 460
  * @param array $compare Result of a CakeSchema::compare()
461 461
  * @return array Array of alter statements to make.
462 462
  */
463  
-	function alterSchema($compare, $table = null) {
  463
+	public function alterSchema($compare, $table = null) {
464 464
 		if (!is_array($compare)) {
465 465
 			return false;
466 466
 		}
@@ -522,7 +522,7 @@ function alterSchema($compare, $table = null) {
522 522
  *                      Otherwise, all tables defined in the schema are generated.
523 523
  * @return string
524 524
  */
525  
-	function dropSchema(CakeSchema $schema, $table = null) {
  525
+	public function dropSchema(CakeSchema $schema, $table = null) {
526 526
 		$out = '';
527 527
 		foreach ($schema->tables as $curTable => $columns) {
528 528
 			if (!$table || $table === $curTable) {
@@ -540,7 +540,7 @@ function dropSchema(CakeSchema $schema, $table = null) {
540 540
  * @return array Array of table property alteration statementes.
541 541
  * @todo Implement this method.
542 542
  */
543  
-	function _alterTableParameters($table, $parameters) {
  543
+	protected function _alterTableParameters($table, $parameters) {
544 544
 		if (isset($parameters['change'])) {
545 545
 			return $this->buildTableParameters($parameters['change']);
546 546
 		}
@@ -554,7 +554,7 @@ function _alterTableParameters($table, $parameters) {
554 554
  * @param array $new Indexes to add and drop
555 555
  * @return array Index alteration statements
556 556
  */
557  
-	function _alterIndexes($table, $indexes) {
  557
+	protected function _alterIndexes($table, $indexes) {
558 558
 		$alter = array();
559 559
 		if (isset($indexes['drop'])) {
560 560
 			foreach($indexes['drop'] as $name => $value) {
@@ -595,7 +595,7 @@ function _alterIndexes($table, $indexes) {
595 595
  * @param string $name Table name to get parameters
596 596
  * @return array Array of tablenames in the database
597 597
  */
598  
-	function listDetailedSources($name = null) {
  598
+	public function listDetailedSources($name = null) {
599 599
 		$condition = '';
600 600
 		$params = array();
601 601
 		if (is_string($name)) {
@@ -633,7 +633,7 @@ function listDetailedSources($name = null) {
633 633
  * @param string $real Real database-layer column type (i.e. "varchar(255)")
634 634
  * @return string Abstract column type (i.e. "string")
635 635
  */
636  
-	function column($real) {
  636
+	public function column($real) {
637 637
 		if (is_array($real)) {
638 638
 			$col = $real['name'];
639 639
 			if (isset($real['limit'])) {
40  lib/Cake/Model/Datasource/Database/Oracle.php
@@ -197,7 +197,7 @@ public function connect() {
197 197
  * Keeps track of the most recent Oracle error
198 198
  *
199 199
  */
200  
-	function _setError($source = null, $clear = false) {
  200
+	protected function _setError($source = null, $clear = false) {
201 201
 		if ($source) {
202 202
 			$e = ocierror($source);
203 203
 		} else {
@@ -215,7 +215,7 @@ function _setError($source = null, $clear = false) {
215 215
  * @param string $lang language constant
216 216
  * @return bool
217 217
  */
218  
-	function setEncoding($lang) {
  218
+	public function setEncoding($lang) {
219 219
 		if (!$this->execute('ALTER SESSION SET NLS_LANGUAGE='.$lang)) {
220 220
 			return false;
221 221
 		}
@@ -227,7 +227,7 @@ function setEncoding($lang) {
227 227
  *
228 228
  * @return string language constant
229 229
  */
230  
-	function getEncoding() {
  230
+	public function getEncoding() {
231 231
 		$sql = 'SELECT VALUE FROM NLS_SESSION_PARAMETERS WHERE PARAMETER=\'NLS_LANGUAGE\'';
232 232
 		if (!$this->execute($sql)) {
233 233
 			return false;
@@ -404,7 +404,7 @@ public function fetchRow() {
404 404
  *
405 405
  * @return unknown
406 406
  */
407  
-	function fetchResult() {
  407
+	public function fetchResult() {
408 408
 		return $this->fetchRow();
409 409
 	}
410 410
 
@@ -522,7 +522,7 @@ public function describe($model) {
522 522
  * @access public
523 523
  *
524 524
  */
525  
-	function truncate($table, $reset = 0) {
  525
+	public function truncate($table, $reset = 0) {
526 526
 
527 527
 		if (empty($this->_sequences)) {
528 528
 			$sql = "SELECT sequence_name FROM all_sequences";
@@ -569,7 +569,7 @@ function truncate($table, $reset = 0) {
569 569
  * @param string $table
570 570
  * @return mixed boolean true or array of constraints
571 571
  */
572  
-	function constraint($action, $table) {
  572
+	public function constraint($action, $table) {
573 573
 		if (empty($table)) {
574 574
 			trigger_error(__d('cake_dev', 'Must specify table to operate on constraints'));
575 575
 		}
@@ -641,7 +641,7 @@ function constraint($action, $table) {
641 641
  * @param string $model Name of model to inspect
642 642
  * @return array Fields in table. Keys are column and unique
643 643
  */
644  
-	function index($model) {
  644
+	public function index($model) {
645 645
 		$index = array();
646 646
 		$table = $this->fullTableName($model, false);
647 647
 		if ($table) {
@@ -683,7 +683,7 @@ function index($model) {
683 683
  * @param unknown_type $schema
684 684
  * @return unknown
685 685
  */
686  
-	function alterSchema($compare, $table = null) {
  686
+	public function alterSchema($compare, $table = null) {
687 687
 		if (!is_array($compare)) {
688 688
 			return false;
689 689
 		}
@@ -754,7 +754,7 @@ public function name($name) {
754 754
  * @return boolean True on success, false on fail
755 755
  * (i.e. if the database/model does not support transactions).
756 756
  */
757  
-	function begin() {
  757
+	public function begin() {
758 758
 		$this->__transactionStarted = true;
759 759
 		return true;
760 760
 	}
@@ -767,7 +767,7 @@ function begin() {
767 767
  * (i.e. if the database/model does not support transactions,
768 768
  * or a transaction has not started).
769 769
  */
770  
-	function rollback() {
  770
+	public function rollback() {
771 771
 		return ocirollback($this->connection);
772 772
 	}
773 773
 
@@ -779,7 +779,7 @@ function rollback() {
779 779
  * (i.e. if the database/model does not support transactions,
780 780
  * or a transaction has not started).
781 781
  */
782  
-	function commit() {
  782
+	public function commit() {
783 783
 		$this->__transactionStarted = false;
784 784
 		return ocicommit($this->connection);
785 785
 	}
@@ -919,7 +919,7 @@ public function lastAffected() {
919 919
  * @param array $data
920 920
  * @return string
921 921
  */
922  
-	function renderStatement($type, $data) {
  922
+	public function renderStatement($type, $data) {
923 923
 		extract($data);
924 924
 		$aliases = null;
925 925
 
@@ -972,7 +972,7 @@ function renderStatement($type, $data) {
972 972
  * @param integer $recursive Number of levels of association
973 973
  * @param array $stack
974 974
  */
975  
-	function queryAssociation($model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) {
  975
+	public function queryAssociation($model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) {
976 976
 		if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) {
977 977
 			if (!isset($resultSet) || !is_array($resultSet)) {
978 978
 				if (Configure::read('debug') > 0) {
@@ -1124,14 +1124,14 @@ function queryAssociation($model, &$linkModel, $type, $association, $assocData,
1124 1124
  *						Otherwise, all tables defined in the schema are generated.
1125 1125
  * @return string
1126 1126
  */
1127  
-		function dropSchema(CakeSchema $schema, $table = null) {
1128  
-			$out = '';
  1127
+	public function dropSchema(CakeSchema $schema, $table = null) {
  1128
+		$out = '';
1129 1129
 
1130  
-			foreach ($schema->tables as $curTable => $columns) {
1131  
-				if (!$table || $table == $curTable) {
1132  
-					$out .= 'DROP TABLE ' . $this->fullTableName($curTable) . "\n";
1133  
-				}
  1130
+		foreach ($schema->tables as $curTable => $columns) {
  1131
+			if (!$table || $table == $curTable) {
  1132
+				$out .= 'DROP TABLE ' . $this->fullTableName($curTable) . "\n";
1134 1133
 			}
1135  
-			return $out;
1136 1134
 		}
  1135
+		return $out;
  1136
+	}
1137 1137
 }
50  lib/Cake/Model/Datasource/Database/Postgres.php
@@ -110,7 +110,7 @@ class Postgres extends DboSource {
110 110
  *
111 111
  * @return True if successfully connected.
112 112
  */
113  
-	function connect() {
  113
+	public function connect() {
114 114
 		$config = $this->config;
115 115
 		$this->connected = false;
116 116
 		try {
@@ -143,7 +143,7 @@ function connect() {
143 143
  *
144 144
  * @return boolean
145 145
  */
146  
-	function enabled() {
  146
+	public function enabled() {
147 147
 		return in_array('pgsql', PDO::getAvailableDrivers());
148 148
 	}
149 149
 
@@ -152,7 +152,7 @@ function enabled() {
152 152
  *
153 153
  * @return array Array of tablenames in the database
154 154
  */
155  
-	function listSources($data = null) {
  155
+	public function listSources($data = null) {
156 156
 		$cache = parent::listSources();
157 157
 
158 158
 		if ($cache != null) {
@@ -184,7 +184,7 @@ function listSources($data = null) {
184 184
  * @param string $tableName Name of database table to inspect
185 185
  * @return array Fields in table. Keys are name and type
186 186
  */
187  
-	function describe($model) {
  187
+	public function describe($model) {
188 188
 		$fields = parent::describe($model);
189 189
 		$table = $this->fullTableName($model, false);
190 190
 		$this->_sequenceMap[$table] = array();
@@ -253,7 +253,7 @@ function describe($model) {
253 253
 		}
254 254
 
255 255
 		if ($cols) {
256  
-			$cols->closeCursor();	
  256
+			$cols->closeCursor();
257 257
 		}
258 258
 		return $fields;
259 259
 	}
@@ -265,7 +265,7 @@ function describe($model) {
265 265
  * @param string $field Name of the ID database field. Defaults to "id"
266 266
  * @return integer
267 267
  */
268  
-	function lastInsertId($source, $field = 'id') {
  268
+	public function lastInsertId($source, $field = 'id') {
269 269
 		$seq = $this->getSequence($source, $field);
270 270
 		return $this->_connection->lastInsertId($seq);
271 271
 	}
@@ -277,7 +277,7 @@ function lastInsertId($source, $field = 'id') {
277 277
  * @param string $field Name of the ID database field. Defaults to "id"
278 278
  * @return string The associated sequence name from the sequence map, defaults to "{$table}_{$field}_seq"
279 279
  */
280  
-	function getSequence($table, $field = 'id') {
  280
+	public function getSequence($table, $field = 'id') {
281 281
 		if (is_object($table)) {
282 282
 			$table = $this->fullTableName($table, false);
283 283
 		}
@@ -321,7 +321,7 @@ public function truncate($table, $reset = true) {
321 321
  * @param string $data
322 322
  * @return string SQL field
323 323
  */
324  
-	function name($data) {
  324
+	public function name($data) {
325 325
 		if (is_string($data)) {
326 326
 			$data = str_replace('"__"', '__', $data);
327 327
 		}
@@ -336,7 +336,7 @@ function name($data) {
336 336
  * @param mixed $fields
337 337
  * @return array
338 338
  */
339  
-	function fields($model, $alias = null, $fields = array(), $quote = true) {
  339
+	public function fields($model, $alias = null, $fields = array(), $quote = true) {
340 340
 		if (empty($alias)) {
341 341
 			$alias = $model->alias;
342 342
 		}
@@ -393,7 +393,7 @@ function fields($model, $alias = null, $fields = array(), $quote = true) {
393 393
  * @return string quoted strig
394 394
  * @access private
395 395
  */
396  
-	function __quoteFunctionField($match) {
  396
+	private function __quoteFunctionField($match) {
397 397
 		$prepend = '';
398 398
 		if (strpos($match[1], 'DISTINCT') !== false) {
399 399
 			$prepend = 'DISTINCT ';
@@ -416,7 +416,7 @@ function __quoteFunctionField($match) {
416 416
  * @param string $model Name of model to inspect
417 417
  * @return array Fields in table. Keys are column and unique
418 418
  */
419  
-	function index($model) {
  419
+	public function index($model) {
420 420
 		$index = array();
421 421
 		$table = $this->fullTableName($model, false);
422 422
 		if ($table) {
@@ -457,7 +457,7 @@ function index($model) {
457 457
  * @access public
458 458
  * @return array
459 459
  */
460  
-	function alterSchema($compare, $table = null) {
  460
+	public function alterSchema($compare, $table = null) {
461 461
 		if (!is_array($compare)) {
462 462
 			return false;
463 463
 		}
@@ -545,7 +545,7 @@ function alterSchema($compare, $table = null) {
545 545
  * @param array $new Indexes to add and drop
546 546
  * @return array Index alteration statements
547 547
  */
548  
-	function _alterIndexes($table, $indexes) {
  548
+	protected function _alterIndexes($table, $indexes) {
549 549
 		$alter = array();
550 550
 		if (isset($indexes['drop'])) {
551 551
 			foreach($indexes['drop'] as $name => $value) {
@@ -587,7 +587,7 @@ function _alterIndexes($table, $indexes) {
587 587
  * @param integer $offset Offset from which to start results
588 588
  * @return string SQL limit/offset statement
589 589
  */
590  
-	function limit($limit, $offset = null) {
  590
+	public function limit($limit, $offset = null) {
591 591
 		if ($limit) {
592 592
 			$rt = '';
593 593
 			if (!strpos(strtolower($limit), 'limit') || strpos(strtolower($limit), 'limit') === 0) {
@@ -610,7 +610,7 @@ function limit($limit, $offset = null) {
610 610
  * @param string $real Real database-layer column type (i.e. "varchar(255)")
611 611
  * @return string Abstract column type (i.e. "string")
612 612
  */
613  
-	function column($real) {
  613
+	public function column($real) {
614 614
 		if (is_array($real)) {
615 615
 			$col = $real['name'];
616 616
 			if (isset($real['limit'])) {
@@ -659,7 +659,7 @@ function column($real) {
659 659
  * @param string $real Real database-layer column type (i.e. "varchar(255)")
660 660
  * @return int An integer representing the length of the column
661 661
  */
662  
-	function length($real) {
  662
+	public function length($real) {
663 663
 		$col = str_replace(array(')', 'unsigned'), '', $real);
664 664
 		$limit = null;
665 665
 
@@ -680,7 +680,7 @@ function length($real) {
680 680
  *
681 681
  * @param unknown_type $results
682 682
  */
683  
-	function resultSet(&$results) {
  683
+	public function resultSet(&$results) {
684 684
 		$this->map = array();
685 685
 		$numFields = $results->columnCount();
686 686
 		$index = 0;
@@ -703,7 +703,7 @@ function resultSet(&$results) {
703 703
  *
704 704
  * @return unknown
705 705
  */
706  
-	function fetchResult() {
  706
+	public function fetchResult() {
707 707
 		if ($row = $this->_result->fetch()) {
708 708
 			$resultRow = array();
709 709
 
@@ -733,11 +733,11 @@ function fetchResult() {
733 733
 /**
734 734
  * Translates between PHP boolean values and PostgreSQL boolean values
735 735
  *
736  
- * @param mixed $data Value to be translated  
  736
+ * @param mixed $data Value to be translated
737 737
  * @param boolean $quote true to quote a boolean to be used in a query, flase to return the boolean value
738 738
  * @return boolean Converted boolean value
739 739
  */
740  
-	function boolean($data, $quote = false) {
  740
+	public function boolean($data, $quote = false) {
741 741
 		switch (true) {
742 742
 			case ($data === true || $data === false):
743 743
 				$result = $data;
@@ -768,7 +768,7 @@ function boolean($data, $quote = false) {
768 768
  * @param mixed $enc Database encoding
769 769
  * @return boolean True on success, false on failure
770 770
  */
771  
-	function setEncoding($enc) {
  771
+	public function setEncoding($enc) {
772 772
 		if ($this->_execute('SET NAMES ?', array($enc))) {
773 773
 			return true;
774 774
 		}
@@ -780,7 +780,7 @@ function setEncoding($enc) {
780 780
  *
781 781
  * @return string The database encoding
782 782
  */
783  
-	function getEncoding() {
  783
+	public function getEncoding() {
784 784
 		$cosa = $this->_execute('SHOW client_encoding')->fetch();
785 785
 	}
786 786
 
@@ -792,7 +792,7 @@ function getEncoding() {
792 792
  *                      where options can be 'default', 'length', or 'key'.
793 793
  * @return string
794 794
  */
795  
-	function buildColumn($column) {
  795
+	public function buildColumn($column) {
796 796
 		$col = $this->columns[$column['type']];
797 797
 		if (!isset($col['length']) && !isset($col['limit'])) {
798 798
 			unset($column['length']);
@@ -825,7 +825,7 @@ function buildColumn($column) {
825 825
  * @param string $table
826 826
  * @return string
827 827
  */
828  
-	function buildIndex($indexes, $table = null) {
  828
+	public function buildIndex($indexes, $table = null) {
829 829
 		$join = array();
830 830
 		if (!is_array($indexes)) {
831 831
 			return array();
@@ -857,7 +857,7 @@ function buildIndex($indexes, $table = null) {
857 857
  * @param array $data
858 858
  * @return string
859 859
  */
860  
-	function renderStatement($type, $data) {
  860
+	public function renderStatement($type, $data) {
861 861
 		switch (strtolower($type)) {
862 862
 			case 'schema':
863 863
 				extract($data);
34  lib/Cake/Model/Datasource/Database/Sqlite.php
@@ -109,7 +109,7 @@ class Sqlite extends DboSource {
109 109
  * @return mixed
110 110
  * @access public
111 111
  */
112  
-	function connect() {
  112
+	public function connect() {
113 113
 		$config = $this->config;
114 114
 		$flags = array(PDO::ATTR_PERSISTENT => $config['persistent']);
115 115
 		try {
@@ -127,7 +127,7 @@ function connect() {
127 127
  *
128 128
  * @return boolean
129 129
  */
130  
-	function enabled() {
  130
+	public function enabled() {
131 131
 		return in_array('sqlite', PDO::getAvailableDrivers());
132 132
 	}
133 133
 
@@ -137,7 +137,7 @@ function enabled() {
137 137
  * @return array Array of tablenames in the database
138 138
  * @access public
139 139
  */
140  
-	function listSources($data = null) {
  140
+	public function listSources($data = null) {
141 141
 		$cache = parent::listSources();
142 142
 		if ($cache != null) {
143 143
 			return $cache;
@@ -165,7 +165,7 @@ function listSources($data = null) {
165 165
  * @return array Fields in table. Keys are name and type
166 166
  * @access public
167 167
  */
168  
-	function describe($model) {
  168
+	public function describe($model) {
169 169
 		$cache = parent::describe($model);
170 170
 		if ($cache != null) {
171 171
 			return $cache;
@@ -207,7 +207,7 @@ function describe($model) {
207 207
  * @return array
208 208
  * @access public
209 209
  */
210  
-	function update($model, $fields = array(), $values = null, $conditions = null) {
  210
+	public function update($model, $fields = array(), $values = null, $conditions = null) {
211 211
 		if (empty($values) && !empty($fields)) {
212 212
 			foreach ($fields as $field => $value) {
213 213
 				if (strpos($field, $model->alias . '.') !== false) {
@@ -229,7 +229,7 @@ function update($model, $fields = array(), $values = null, $conditions = null) {
229 229
  * @return boolean	SQL TRUNCATE TABLE statement, false if not applicable.
230 230
  * @access public
231 231
  */
232  
-	function truncate($table) {
  232
+	public function truncate($table) {
233 233
 		$this->_execute('DELETE FROM sqlite_sequence where name=' . $this->fullTableName($table));
234 234
 		return $this->execute('DELETE FROM ' . $this->fullTableName($table));
235 235
 	}
@@ -241,7 +241,7 @@ function truncate($table) {
241 241
  * @return string Abstract column type (i.e. "string")
242 242
  * @access public
243 243
  */
244  
-	function column($real) {
  244
+	public function column($real) {
245 245
 		if (is_array($real)) {
246 246
 			$col = $real['name'];
247 247
 			if (isset($real['limit'])) {
@@ -275,7 +275,7 @@ function column($real) {
275 275
  * @param mixed $results
276 276
  * @access public
277 277
  */
278  
-	function resultSet($results) {
  278
+	public function resultSet($results) {
279 279
 		$this->results = $results;
280 280
 		$this->map = array();
281 281
 		$num_fields = $results->columnCount();
@@ -332,7 +332,7 @@ function resultSet($results) {
332 332
  *
333 333
  * @return mixed array with results fetched and mapped to column names or false if there is no results left to fetch
334 334
  */
335  
-	function fetchResult() {
  335
+	public function fetchResult() {
336 336
 		if ($row = $this->_result->fetch()) {
337 337
 			$resultRow = array();
338 338
 			foreach ($this->map as $col => $meta) {
@@ -358,7 +358,7 @@ function fetchResult() {
358 358
  * @return string SQL limit/offset statement
359 359
  * @access public
360 360
  */
361  
-	function limit($limit, $offset = null) {
  361
+	public function limit($limit, $offset = null) {
362 362
 		if ($limit) {
363 363
 			$rt = '';
364 364
 			if (!strpos(strtolower($limit), 'limit') || strpos(strtolower($limit), 'limit') === 0) {
@@ -381,7 +381,7 @@ function limit($limit, $offset = null) {
381 381
  * @return string
382 382
  * @access public
383 383
  */
384  
-	function buildColumn($column) {
  384
+	public function buildColumn($column) {
385 385
 		$name = $type = null;
386 386
 		$column = array_merge(array('null' => true), $column);
387 387
 		extract($column);
@@ -410,7 +410,7 @@ function buildColumn($column) {
410 410
  * @param string $enc Database encoding
411 411
  * @access public
412 412
  */
413  
-	function setEncoding($enc) {
  413
+	public function setEncoding($enc) {
414 414
 		if (!in_array($enc, array("UTF-8", "UTF-16", "UTF-16le", "UTF-16be"))) {
415 415
 			return false;
416 416
 		}
@@ -423,7 +423,7 @@ function setEncoding($enc) {
423 423
  * @return string The database encoding
424 424
  * @access public
425 425
  */
426  
-	function getEncoding() {
  426
+	public function getEncoding() {
427 427
 		return $this->fetchRow('PRAGMA encoding');
428 428
 	}
429 429
 
@@ -435,7 +435,7 @@ function getEncoding() {
435 435
  * @return string
436 436
  * @access public
437 437
  */
438  
-	function buildIndex($indexes, $table = null) {
  438
+	public function buildIndex($indexes, $table = null) {
439 439
 		$join = array();
440 440
 
441 441
 		foreach ($indexes as $name => $value) {
@@ -468,7 +468,7 @@ function buildIndex($indexes, $table = null) {
468 468
  * @return array Fields in table. Keys are column and unique
469 469
  * @access public
470 470
  */
471  
-	function index($model) {
  471
+	public function index($model) {
472 472
 		$index = array();
473 473
 		$table = $this->fullTableName($model);
474 474
 		if ($table) {
@@ -509,7 +509,7 @@ function index($model) {
509 509
  * @return string
510 510
  * @access public
511 511
  */
512  
-	function renderStatement($type, $data) {
  512
+	public function renderStatement($type, $data) {
513 513
 		switch (strtolower($type)) {
514 514
 			case 'schema':
515 515
 				extract($data);
@@ -533,7 +533,7 @@ function renderStatement($type, $data) {
533 533
  * @return boolean
534 534
  * @access public
535 535
  */
536  
-	function hasResult() {
  536
+	public function hasResult() {
537 537
 		return is_object($this->_result);
538 538
 	}
539 539
 
28  lib/Cake/Model/Datasource/DboSource.php
@@ -280,7 +280,7 @@ public function __construct($config = null, $autoConnect = true) {
280 280
  * @param array $config An array defining the new configuration settings
281 281
  * @return boolean True on success, false on failure
282 282
  */
283  
-	function reconnect($config = array()) {
  283
+	public function reconnect($config = array()) {
284 284
 		$this->disconnect();
285 285
 		$this->setConfig($config);
286 286
 		$this->_sources = null;
@@ -293,7 +293,7 @@ function reconnect($config = array()) {
293 293