/** * Get instanz of the object (Singelton) * * @return ClipboardXmlWriter */ public static function getInstance() { if (self::$_objInstance == NULL) { self::$_objInstance = new ClipboardXmlWriter(); } return self::$_objInstance; }
/** * Unfavor all clipboard elements and write given array to xml file * * @param array $arrSet */ public function write($arrSet) { $objFile = $this->getFavorite(); $this->unFavorAll(); $arrSet['filename'] = $this->_getFileName($arrSet); $arrSet['path'] = $this->getPath(); if (!$this->_objXmlWriter->writeXml($arrSet, $this->_arrClipboardElements)) { $objFile->setFavorite(TRUE); } }
/** * Set new title in file header */ protected function _setNewTitle($title) { $this->_objXmlWriter->setNewTitle($this->getFilePath('full'), $this->getFilePath(), $title); }