getRepository() public method

Returns the repository instance
public getRepository ( ) : TQ\Vcs\Repository\RepositoryInterface
return TQ\Vcs\Repository\RepositoryInterface
コード例 #1
0
 /**
  * Returns the file stream to handle the requested path
  *
  * @param   PathInformationInterface     $path   The path information
  * @param   string                       $mode   The mode used to open the path
  * @return  FileBufferInterface                  The file buffer to handle the path
  */
 public function createFileBuffer(PathInformationInterface $path, $mode)
 {
     $repo = $path->getRepository();
     $buffer = $repo->showFile($path->getLocalPath(), $path->getRef());
     $objectInfo = $repo->getObjectInfo($path->getLocalPath(), $path->getRef());
     return new StringBuffer($buffer, $objectInfo, 'r');
 }
コード例 #2
0
 /**
  * streamWrapper::stream_close — Close an resource
  */
 public function stream_close()
 {
     $this->fileBuffer->close();
     $this->fileBuffer = null;
     $repo = $this->path->getRepository();
     if ($repo->isDirty()) {
         $repo->add(array($this->path->getFullPath()));
         $commitMsg = $this->getContextOption('commitMsg', null);
         $author = $this->getContextOption('author', null);
         $repo->commit($commitMsg, array($this->path->getFullPath()), $author);
     }
     $this->path = null;
 }
コード例 #3
0
 /**
  * Returns the file stream to handle the requested path
  *
  * @param   PathInformationInterface     $path   The path information
  * @param   string                       $mode   The mode used to open the path
  * @return  FileBufferInterface                  The file buffer to handle the path
  */
 public function createFileBuffer(PathInformationInterface $path, $mode)
 {
     return new StringBuffer($this->createLogString($path->getRepository(), $path->getArgument('limit'), $path->getArgument('skip')), array(), 'r');
 }
コード例 #4
0
 /**
  * Returns the file stream to handle the requested path
  *
  * @param   PathInformationInterface     $path   The path information
  * @param   string                       $mode   The mode used to open the path
  * @return  FileBufferInterface                  The file buffer to handle the path
  */
 public function createFileBuffer(PathInformationInterface $path, $mode)
 {
     $repo = $path->getRepository();
     $buffer = $repo->showCommit($path->getArgument('ref'));
     return new StringBuffer($buffer, array(), 'r');
 }