Gitonomy\Git\Repository::getLog PHP Метод

getLog() публичный Метод

All those values can be null, meaning everything.
public getLog ( array $revisions = null, array $paths = null, integer $offset = null, integer $limit = null ) : Gitonomy\Git\Log
$revisions array An array of revisions to show logs from. Can be any text value type
$paths array Restrict log to modifications occurring on given paths.
$offset integer Start from a given offset in results.
$limit integer Limit number of total results.
Результат Gitonomy\Git\Log
    public function getLog($revisions = null, $paths = null, $offset = null, $limit = null)
    {
        return new Log($this, $revisions, $paths, $offset, $limit);
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getCommits()
 {
     /** @var \Gitonomy\Git\Log $log */
     $log = $this->repository->getLog($this->options['revision'], null, null, $this->options['limit']);
     if (!$log->countCommits()) {
         throw new \RuntimeException('No commits found');
     }
     $this->counters['total'] = $log->countCommits();
     $commits = $log->getIterator();
     foreach ($commits as $commitData) {
         /** @var \Gitonomy\Git\Commit $commitData */
         $commit = $this->createCommit($commitData);
         if ($this->skipCommit($commit)) {
             $this->counters['skipped']++;
             continue;
         }
         $this->counters['analyzed']++;
         (yield $commit);
     }
 }
All Usage Examples Of Gitonomy\Git\Repository::getLog