From d63a7b14a6e1140fe5aa0610b1490f69b3494623 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 21 Nov 2012 22:33:59 +0100 Subject: [PATCH] move load method to top --- src/phorkie/Repository.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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); -- 2.30.2