diff options
author | Tomas Prochazka <[email protected]> | 2015-11-12 10:17:05 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-11-17 17:09:02 +0100 |
commit | 452c4d0c6fd898245f7db68d00db64922d028be5 (patch) | |
tree | dfb4412c60d3eb386841196112c911009827d834 /test/Foo.php | |
parent | e9456021113f62e56ce33215ae00c4182acc4762 (diff) |
Sort by magic properies of object.
Diffstat (limited to '')
-rw-r--r-- | test/Foo.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Foo.php b/test/Foo.php index e6e688c..4b6148b 100644 --- a/test/Foo.php +++ b/test/Foo.php @@ -7,4 +7,17 @@ class Foo { public $name; + private $attrs = array(); + + public function __isset($name) { + return isset($this->attrs[$name]); + } + + public function __get($name) { + return $this->attrs[$name]; + } + + public function __set($name, $value) { + $this->attrs[$name] = $value; + } } |