/** * Efetua a persistencia de arquivos * @return ValueObjectAbstract * @todo transformar para sistemas genericos do SIAL, nao somente do SIAL */ public function filePersist() { $source = end(explode(self::NAMESPACE_SEPARATOR, self::$_voFile->getClassName())); $dstPath = base64_decode(Folder::factory()->createFolderStructure($source)); $finalPath = self::_saveRootTamburete($dstPath); if (NULL != self::$_hashFile) { $rootHash = basename(self::_getRootTamburete($dstPath), '.xml'); $src = $dstPath . DIRECTORY_SEPARATOR . $rootHash . DIRECTORY_SEPARATOR . self::$_hashFile; self::$_voFile->setSource(base64_encode($this->_cryptPath($src))); self::$_voFile->setName(self::$_hashFile); } return self::$_voFile; }