filename = $filename; $this->localname = $localname; } public function getFilename() { return $this->filename; } public function getLocalName() { return $this->localname; } public function addToPhar(\Phar $phar) { $phar->addFile( $this->getFilename(), $this->getLocalName() ); } public function addFiltered(\Phar $phar, callable $filter) { $body = file_get_contents($this->filename); $body = call_user_func($filter, $body); $phar->addFromString($this->getLocalName(), $body); } }