public function getRevision($revision) { // Select revision by index if (is_int($revision)) { if (isset($this->history[$revision])) { return $this->history[$revision]; } // Search revision by timestamp } else { foreach ($this->history as $history) { if ($history['timestamp'] == $revision) { return $history; } } } // Return error message $this->error = array(); $this->error['file'] = "Revision '{$revision}' was not found for this file"; return null; }