diff --git a/lib/mwlib/src/MW/Config/Abstract.php b/lib/mwlib/src/MW/Config/Abstract.php index 4679675d07..625813d0ae 100644 --- a/lib/mwlib/src/MW/Config/Abstract.php +++ b/lib/mwlib/src/MW/Config/Abstract.php @@ -25,7 +25,7 @@ abstract class MW_Config_Abstract implements MW_Config_Interface * @param string $file Path and file name of a config file * @return array Value of the requested config file **/ - protected function _include( $file ) + protected function includeFile( $file ) { if( !isset( $this->_includeCache[$file] ) ) { $this->_includeCache[$file] = include $file; diff --git a/lib/mwlib/src/MW/Config/Array.php b/lib/mwlib/src/MW/Config/Array.php index f9bb62f882..97cd0f9271 100644 --- a/lib/mwlib/src/MW/Config/Array.php +++ b/lib/mwlib/src/MW/Config/Array.php @@ -46,7 +46,7 @@ public function get( $name, $default = null ) { $parts = explode( '/', trim( $name, '/' ) ); - if( ( $value = $this->_get( $this->_config, $parts ) ) !== null ) { + if( ( $value = $this->getPart( $this->_config, $parts ) ) !== null ) { return $value; } @@ -54,7 +54,7 @@ public function get( $name, $default = null ) $this->_config = $this->_load( $this->_config, $fspath, $parts ); } - if( ( $value = $this->_get( $this->_config, $parts ) ) !== null ) { + if( ( $value = $this->getPart( $this->_config, $parts ) ) !== null ) { return $value; } @@ -71,7 +71,7 @@ public function get( $name, $default = null ) public function set( $name, $value ) { $parts = explode( '/', trim( $name, '/' ) ); - $this->_config = $this->_set( $this->_config, $parts, $value ); + $this->_config = $this->setPart( $this->_config, $parts, $value ); } @@ -82,12 +82,12 @@ public function set( $name, $value ) * @param array $parts Configuration path parts to look for inside the array * @return mixed Found value or null if no value is available */ - protected function _get( $config, $parts ) + protected function getPart( $config, $parts ) { if( ( $current = array_shift( $parts ) ) !== null && isset( $config[$current] ) ) { if( count( $parts ) > 0 ) { - return $this->_get( $config[$current], $parts ); + return $this->getPart( $config[$current], $parts ); } return $config[$current]; @@ -104,14 +104,14 @@ protected function _get( $config, $parts ) * @param array $path Configuration path parts * @param array $value The new value */ - protected function _set( $config, $path, $value ) + protected function setPart( $config, $path, $value ) { if( ( $current = array_shift( $path ) ) !== null ) { if( isset( $config[$current] ) ) { - $config[$current] = $this->_set( $config[$current], $path, $value ); + $config[$current] = $this->setPart( $config[$current], $path, $value ); } else { - $config[$current] = $this->_set( array(), $path, $value ); + $config[$current] = $this->setPart( array(), $path, $value ); } return $config; @@ -150,7 +150,7 @@ protected function _load( array $config, $path, array $parts ) $config[$key] = array(); } - $config[$key] = $this->_merge( $config[$key], $this->_include( $newPath . '.php' ) ); + $config[$key] = $this->_merge( $config[$key], $this->includeFile( $newPath . '.php' ) ); } }