public function __construct(AbstractSource $source) { // copy all the attributes $this->fileName = $source->getFileName(); $this->fileExtension = $source->getFileExtension(); $this->displayName = $source->getDisplayName(); $this->filePath = $source->getFilePath(); $this->fileSize = $source->getFileSize(); $this->mimeType = $source->getMimeType(); }
/** * @TODO: allow hash file name, rolling folder by date etc * * @param AbstractSource $source * @return string */ private function getDstPath(AbstractSource $source) { return $this->basePath . '/' . $source->getFileName(); }