/** * * @param string $singlename */ public function __construct($singlename) { parent::__construct($singlename); if ($this->_context->CacheHashedDir()) { $this->setFilenameLocation(ForceFilenameLocation::DefinePath, $this->_context->CachePath() . $singlename[0] . FileUtil::Slash() . $singlename[1] . FileUtil::Slash()); if (!FileUtil::Exists($this->PathSuggested())) { FileUtil::ForceDirectories($this->PathSuggested()); } } else { $this->_filenameLocation = ForceFilenameLocation::PrivatePath; } }
public function saveDocument($documentName, $xml, $btree) { $btree = BTreeUtil::navigateNodes($xml->documentElement, $documentName . "#/", $btree); $documentName = self::getFullFileName($documentName); FileUtil::ForceDirectories(self::getPathFromFile($documentName)); $xml->normalize(); XmlUtil::SaveXmlDocument($xml, $documentName); return $btree; }