public $token;
/**
- * Host information cache
+ * Host information
*
- * @var Config_HostCache
+ * @var Config_HostEndpoints
*/
- public $cache;
+ public $endpoints;
/**
* If this host is the default one
* @var boolean
*/
public $default;
+
+ public function __construct()
+ {
+ $this->endpoints = new Config_Endpoints();
+ }
+
+ public function loadEndpoints()
+ {
+ $this->endpoints = new Config_Endpoints();
+ $this->endpoints->load($this->server);
+ if ($this->endpoints->incomplete()) {
+ $this->endpoints->discover($this->server);
+ if ($this->token) {
+ $this->endpoints->discoverMedia($this->token);
+ }
+ $this->endpoints->save($this->server);
+ }
+ }
}
?>