public function __get($name) { if (preg_match('/(.+)Scope$/', $name, $matches) == 1) { $this->scope = $matches[1]; return $this; } return null; }