From: Christian Weiske Date: Wed, 21 Nov 2012 21:33:59 +0000 (+0100) Subject: move load method to top X-Git-Tag: v0.4.0~88 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/d63a7b14a6e1140fe5aa0610b1490f69b3494623 move load method to top --- diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php index d82789d..5c68ee4 100644 --- a/src/phorkie/Repository.php +++ b/src/phorkie/Repository.php @@ -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);