Skip to content

Commit

Permalink
Moving methods that do not need to be private into protected.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 24, 2010
1 parent 4d4d9e7 commit 50c0433
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cake/dispatcher.php
Expand Up @@ -99,7 +99,7 @@ public function dispatch($url = null, $additionalParams = array()) {
}

if (is_array($url)) {
$url = $this->__extractParams($url, $additionalParams);
$url = $this->_extractParams($url, $additionalParams);
} else {
if ($url) {
$_GET['url'] = $url;
Expand All @@ -112,7 +112,7 @@ public function dispatch($url = null, $additionalParams = array()) {
if ($this->asset($url) || $this->cached($url)) {
$this->_stop();
}
$controller =& $this->__getController();
$controller = $this->_getController();

if (!is_object($controller)) {
Router::setRequestInfo(array($this->params, array('base' => $this->base, 'webroot' => $this->webroot)));
Expand Down Expand Up @@ -221,9 +221,8 @@ protected function _invoke(&$controller, $params) {
* @param array $url Array or request parameters
* @param array $additionalParams Array of additional parameters.
* @return string $url The generated url string.
* @access private
*/
function __extractParams($url, $additionalParams = array()) {
protected function _extractParams($url, $additionalParams = array()) {
$defaults = array('pass' => array(), 'named' => array(), 'form' => array());
$this->params = array_merge($defaults, $url, $additionalParams);
return Router::url($url);
Expand Down Expand Up @@ -368,9 +367,8 @@ public function baseUrl() {
*
* @param array $params Array of parameters
* @return mixed name of controller if not loaded, or object if loaded
* @access private
*/
function &__getController() {
protected function &_getController() {
$controller = false;
$ctrlClass = $this->__loadController($this->params);
if (!$ctrlClass) {
Expand Down

0 comments on commit 50c0433

Please sign in to comment.