add support for articles (with HTML)
[shpub.git] / src / shpub / Config / Host.php
index 6ef05d971d6064862b74b561a886941e19866aed..51d0ff59650a770a4d1f9c38283809549ff401ba 100644 (file)
@@ -25,11 +25,11 @@ class Config_Host
     public $token;
 
     /**
-     * Host information cache
+     * Host information
      *
-     * @var Config_HostCache
+     * @var Config_HostEndpoints
      */
-    public $cache;
+    public $endpoints;
 
     /**
      * If this host is the default one
@@ -37,5 +37,20 @@ class Config_Host
      * @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);
+            $this->endpoints->save($this->server);
+        }
+    }
 }
 ?>