public function fromLog(Log $log) { $log->setLimit(self::DEFAULT_LIMIT); $commits = array(); foreach ($log as $commit) { array_push($commits, array('hash' => $commit->getHash(), 'fixedShortHash' => $commit->getFixedShortHash(), 'message' => $commit->getMessage(), 'shortMessage' => $commit->getShortMessage(), 'authorName' => $commit->getAuthorName(), 'authorEmail' => $commit->getAuthorEmail())); } $this->setCommits($commits); $this->setCommitCount(count($log)); }
/** * {@inheritdoc} */ public function get($offset, $limit) { $this->log->setOffset($offset); $this->log->setLimit($limit); return $this->log->getCommits(); }