public function __get($name) { if ($name === 'handler') { // before Elgg 2.2 the widget definitions had the handler attribute as the id return $this->id; } return $this->{$name}; }