07be59d34b
Props Frank Klein Fixes #42277 git-svn-id: https://develop.svn.wordpress.org/trunk@42381 602fd350-edb4-49c9-b593-d223f7449a82
44 lines
788 B
PHP
44 lines
788 B
PHP
<?php
|
|
/**
|
|
* Unit Tests: Basic_Object cloass
|
|
*
|
|
* @package WordPress
|
|
* @subpackage UnitTests
|
|
* @since 4.7.0
|
|
*/
|
|
|
|
trigger_error( __FILE__ . ' is deprecated since version 5.0.0 with no alternative available.' );
|
|
|
|
/**
|
|
* Class used to test accessing methods and properties
|
|
*
|
|
* @since 4.0.0
|
|
*/
|
|
class Basic_Object {
|
|
private $foo = 'bar';
|
|
|
|
public function __get( $name ) {
|
|
return $this->$name;
|
|
}
|
|
|
|
public function __set( $name, $value ) {
|
|
return $this->$name = $value;
|
|
}
|
|
|
|
public function __isset( $name ) {
|
|
return isset( $this->$name );
|
|
}
|
|
|
|
public function __unset( $name ) {
|
|
unset( $this->$name );
|
|
}
|
|
|
|
public function __call( $name, $arguments ) {
|
|
return call_user_func_array( array( $this, $name ), $arguments );
|
|
}
|
|
|
|
private function callMe() {
|
|
return 'maybe';
|
|
}
|
|
}
|