/** * Add a file from the passed string. * * @param string $localName The local name of the file. * * @param string $contents The file contents to use. * * @return FileEntry */ public function addFromString($localName, $contents) { $add = new FileEntry(); $add->setContent($contents)->setFilename($localName); $this->pharchive->addFile($add); return $add; }