diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-11-21 22:33:59 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-11-21 22:33:59 +0100 |
| commit | d63a7b14a6e1140fe5aa0610b1490f69b3494623 (patch) | |
| tree | 47ff42f4df099915e88b1aa28e6914193ae0a628 /src/phorkie/Repository.php | |
| parent | fe7ab7b1a829160ebabdd85ee4940ca8fd986ed4 (diff) | |
| download | phorkie-d63a7b14a6e1140fe5aa0610b1490f69b3494623.tar.gz phorkie-d63a7b14a6e1140fe5aa0610b1490f69b3494623.zip | |
move load method to top
Diffstat (limited to 'src/phorkie/Repository.php')
| -rw-r--r-- | src/phorkie/Repository.php | 20 |
1 files 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); |
