From 452c4d0c6fd898245f7db68d00db64922d028be5 Mon Sep 17 00:00:00 2001 From: Tomas Prochazka Date: Thu, 12 Nov 2015 10:17:05 +0100 Subject: Sort by magic properies of object. --- test/Foo.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/Foo.php') 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; + } } -- cgit v1.2.3