Beispiel #1
0
 /**
  * Writes the annotated tag to IO
  * @param IOInterface $io The IO to write to
  * @internal
  */
 public function write(IOInterface $io)
 {
     $io->addObject($this);
     $this->object->write($io);
 }
Beispiel #2
0
 public function getSHA1()
 {
     if ($this->sha1 === null) {
         $this->remap();
     }
     $sha1 = parent::getSHA1();
     $this->clearSHA1();
     return $sha1;
 }
Beispiel #3
0
 /**
  * Writes the reference and the object it refers to to disk
  * @param \gihp\IO\IOInterface $io
  */
 public function write(IOInterface $io)
 {
     $io->addRef($this);
     $this->commit->write($io);
 }
Beispiel #4
0
 /**
  * Gets the data in the blob
  */
 public function getData()
 {
     return parent::getData();
 }
Beispiel #5
0
 public function removeObject(\gihp\Object\Internal $object)
 {
     $hash = $object->getSHA1();
     $file = $this->path . '/objects/' . substr($hash, 0, 2) . '/' . substr($hash, 2);
     if (!is_file($file)) {
         return;
     }
     return unlink($file);
 }