Example #1
0
 public function open()
 {
     if (!isset($this->document)) {
         parent::open();
         $this->document = new \DOMDocument('1.0', 'utf-8');
     }
 }
Example #2
0
 public function open()
 {
     if (!isset($this->document)) {
         parent::open();
         $this->document = new \XLSXWriter();
     }
 }
Example #3
0
 public function open()
 {
     if (!isset($this->document)) {
         parent::open();
         $filename = $this->getDDN();
         $this->document = fopen($filename, 'w');
     }
 }
 /**
  * Stores current properties to specified file.
  * 
  * @param PhingFile $file File to create/overwrite with properties.
  * @param string $header Header text that will be placed (within comments) at the top of properties file.
  * @return void
  * @throws IOException - on error writing properties file.
  */
 function store(PhingFile $file, $header = null)
 {
     // stores the properties in this object in the file denoted
     // if file is not given and the properties were loaded from a
     // file prior, this method stores them in the file used by load()
     try {
         $fw = new FileWriter($file);
         $fw->open();
         if ($header !== null) {
             $fw->write("# " . $header . Phing::getProperty("line.separator"));
         }
         $fw->write($this->toString());
         $fw->close();
     } catch (IOException $e) {
         throw new IOException("Error writing property file: " . $e->getMessage());
     }
 }