/** * 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); }
public function getSHA1() { if ($this->sha1 === null) { $this->remap(); } $sha1 = parent::getSHA1(); $this->clearSHA1(); return $sha1; }
/** * 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); }
/** * Gets the data in the blob */ public function getData() { return parent::getData(); }
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); }