Ejemplo n.º 1
0
 /**
  * back up retrived files that were processed to a third patry path.
  * @param \Billrun_Processor $processor the processor instace contain the current processed file data. 
  */
 public function afterProcessorStore(\Billrun_Processor $processor)
 {
     if ($processor->getType() != $this->getName()) {
         return;
     }
     $path = Billrun_Factory::config()->getConfigValue($this->getName() . '.thirdparty.backup_path', false, 'string');
     if (!$path) {
         return;
     }
     if ($processor->retrievedHostname) {
         $path = $path . DIRECTORY_SEPARATOR . $processor->retrievedHostname;
     }
     Billrun_Factory::log()->log("Saving  file to third party at : {$path}", Zend_Log::DEBUG);
     if (!$processor->backupToPath($path, true)) {
         Billrun_Factory::log()->log("Couldn't  save file to third patry path at : {$path}", Zend_Log::ERR);
     }
 }