Exemplo n.º 1
0
 public function save(\apf\core\File $file)
 {
     try {
         $returnOpt = $this->getCurlOption("RETURNTRANSFER");
         $this->setCurlOption("RETURNTRANSFER", FALSE);
         $this->setCurlOption("FILE", $file->open("w"));
         $this->connect();
         $file->close();
         $this->setCurlOption("RETURNTRANSFER", $returnOpt);
         return TRUE;
     } catch (\Exception $e) {
         $this->setCurlOption("RETURNTRANSFER", $returnOpt);
         throw $e;
         return FALSE;
     }
 }