aboutsummaryrefslogtreecommitdiff
path: root/test/Foo.php
diff options
context:
space:
mode:
authorTomas Prochazka <[email protected]>2015-11-12 10:17:05 +0100
committerVictor Häggqvist <[email protected]>2015-11-17 17:09:02 +0100
commit452c4d0c6fd898245f7db68d00db64922d028be5 (patch)
treedfb4412c60d3eb386841196112c911009827d834 /test/Foo.php
parente9456021113f62e56ce33215ae00c4182acc4762 (diff)
Sort by magic properies of object.
Diffstat (limited to 'test/Foo.php')
-rw-r--r--test/Foo.php13
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;
+ }
}