_scope .= "s/" . $user; parent::__construct($api_url, $api_token); } protected function set_scope() { $this->url .= $this->_scope; } public function load($force = true) { $ret = parent::load($force); //$this->url = API_URL . "/users/" . $this->ulogin; return $ret; } public function get($scope) { switch ($scope) { case "/repos": return new User\Repos($this->url, $this->token); case "/tokens": return new User\Tokens($this->url, $this->token); } } protected function json_set_property($obj) { foreach ($obj as $key => $value) { $key = 'u' . $key; if (property_exists($this, $key)) $this->{$key} = $value; } } } } ?>