In WP_Filesystem_Base, make the only private member, $cache, public and remove magic methods. $cache was always public until [28487], has been essentially public via a magic method since.

See #30891.


git-svn-id: https://develop.svn.wordpress.org/trunk@31145 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-01-11 22:03:59 +00:00
parent bbc7ca2d0d
commit ad6dd738b2

View File

@ -24,11 +24,10 @@ class WP_Filesystem_Base {
/**
* Cached list of local filepaths to mapped remote filepaths.
*
* @access private
* @since 2.7.0
* @var array
*/
private $cache = array();
public $cache = array();
/**
* The Access method of the current connection, Set automatically.
@ -39,58 +38,6 @@ class WP_Filesystem_Base {
*/
public $method = '';
/**
* Make private properties readable for backwards compatibility.
*
* @since 4.0.0
* @access public
*
* @param string $name Property to get.
* @return mixed Property.
*/
public function __get( $name ) {
return $this->$name;
}
/**
* Make private properties settable for backwards compatibility.
*
* @since 4.0.0
* @access public
*
* @param string $name Property to set.
* @param mixed $value Property value.
* @return mixed Newly-set property.
*/
public function __set( $name, $value ) {
return $this->$name = $value;
}
/**
* Make private properties checkable for backwards compatibility.
*
* @since 4.0.0
* @access public
*
* @param string $name Property to check if set.
* @return bool Whether the property is set.
*/
public function __isset( $name ) {
return isset( $this->$name );
}
/**
* Make private properties un-settable for backwards compatibility.
*
* @since 4.0.0
* @access public
*
* @param string $name Property to unset.
*/
public function __unset( $name ) {
unset( $this->$name );
}
/**
* Return the path on the remote filesystem of ABSPATH.
*
@ -280,7 +227,6 @@ class WP_Filesystem_Base {
*
* Expects Windows sanitized path.
*
* @access private
* @since 2.7.0
*
* @param string $folder The folder to locate.
@ -439,7 +385,6 @@ class WP_Filesystem_Base {
/**
* Determine if the string provided contains binary characters.
*
* @access private
* @since 2.7.0
*
* @param string $text String to test against.