Fill out inline documentation for magic methods added to the `WP_Error` class in [28511].

See #27881, #22234 and #28885.

Built from https://develop.svn.wordpress.org/trunk@29144


git-svn-id: http://core.svn.wordpress.org/trunk@28928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-07-13 23:42:14 +00:00
parent 1a6884d13e
commit bf3f95f36f
1 changed files with 20 additions and 13 deletions

View File

@ -66,45 +66,52 @@ class WP_Error {
}
/**
* Make private properties readable for backwards compatibility
* Make private properties readable for backwards compatibility.
*
* @since 4.0.0
* @param string $name
* @return mixed
* @access public
*
* @param string $name Property to get.
* @return mixed Property.
*/
public function __get( $name ) {
return $this->$name;
}
/**
* Make private properties setable for backwards compatibility
* Make private properties setable for backwards compatibility.
*
* @since 4.0.0
* @param string $name
* @param string $value
* @return mixed
* @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
* Make private properties checkable for backwards compatibility.
*
* @since 4.0.0
* @param string $name
* @return mixed
* @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 unsetable for backwards compatibility
* Make private properties unsetable for backwards compatibility.
*
* @since 4.0.0
* @param string $name
* @return mixed
* @access public
*
* @param string $name Property to unset.
*/
public function __unset( $name ) {
unset( $this->$name );