setContents() public method

public setContents ( $contents )
Exemplo n.º 1
0
 public function hydrate(RawObject $raw_object)
 {
     $blob = new Blob();
     $blob->setSha($raw_object->getSha());
     $blob->setContents($raw_object->getData());
     return $blob;
 }
Exemplo n.º 2
0
 public function write($key, $content, array $metadata = null)
 {
     $blob = new Blob();
     $blob->setContents($content);
     $this->repo->desiccateGitObject($blob);
     $entry = new IndexEntry();
     $entry->setCtime(time() . ".0");
     $entry->setMtime(time() . ".0");
     $entry->setDev(0);
     $entry->setInode(0);
     $entry->setMode(0100644);
     $entry->setUid(0);
     $entry->setGid(0);
     $entry->setFileSize(strlen($content));
     $entry->setBlob($blob);
     $entry->setName($key);
     $entry->setStage(0);
     $this->getIndex()->addEntry($entry);
     $this->flushIfSupposedTo();
 }