move load method to top
[phorkie.git] / src / phorkie / Repository.php
index d82789d54dc0ef44c26fd9d38acf659b07c7d6b4..5c68ee4806525f79b8c15b0b3fd308cba0103beb 100644 (file)
@@ -65,6 +65,16 @@ class Repository
         $this->loadMessage();
     }
 
+    public function loadById($id)
+    {
+        if (!is_numeric($id)) {
+            throw new Exception_Input('Paste ID not numeric');
+        }
+        $this->id = (int)$id;
+        $this->loadDirs();
+        $this->loadHash();
+    }
+
     protected function loadDirs()
     {
         $gitDir = $GLOBALS['phorkie']['cfg']['gitdir'] . '/' . $this->id . '.git';
@@ -126,16 +136,6 @@ class Repository
         }
     }
 
-    public function loadById($id)
-    {
-        if (!is_numeric($id)) {
-            throw new Exception_Input('Paste ID not numeric');
-        }
-        $this->id = (int)$id;
-        $this->loadDirs();
-        $this->loadHash();
-    }
-
     public function getVc()
     {
         return new \VersionControl_Git($this->gitDir);