Пример #1
0
 /**
  * @return	void
  */
 protected function write()
 {
     /* Convert to INI format */
     $fileContents = '';
     foreach ($this->contents as $section => $contents) {
         if (count($contents) > 0) {
             $fileContents .= "[{$section}]" . PHP_EOL;
             foreach ($contents as $name => $value) {
                 $fileContents .= "{$name} = {$value}" . PHP_EOL;
             }
         }
     }
     $this->fileCookies->putContents($fileContents);
 }
Пример #2
0
 /**
  * @return	void
  */
 public function write()
 {
     $encodedData = json_encode($this->data, JSON_PRETTY_PRINT);
     $this->source->putContents($encodedData);
 }