예제 #1
0
파일: Cookie.php 프로젝트: huxtable/cli
 /**
  * @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
파일: Config.php 프로젝트: huxtable/core
 /**
  * @return	void
  */
 public function write()
 {
     $encodedData = json_encode($this->data, JSON_PRETTY_PRINT);
     $this->source->putContents($encodedData);
 }