Example #1
0
 public function __construct($options)
 {
     parent::__construct($options);
     if (isset($options['return'])) {
         $this->return = $options['return'];
     }
 }
Example #2
0
 /**
  * constructor - load basic options
  *
  * @param array $options for the file processor
  */
 public function __construct($options)
 {
     parent::__construct($options);
     if (isset($options['path'])) {
         $this->loadFile($options['path']);
     }
     if (isset($options['parser']) && $options['parser'] != 'none') {
         $this->setParser($options['parser']);
     }
     if (isset($options['processor']['line_numbers'])) {
         $this->line_numbers = $options['processor']['line_numbers'];
     }
     if (isset($options['orphan_files_time'])) {
         $this->orphandFilesAdoptionTime = $options['orphan_files_time'];
     } else {
         if (isset($options['processor']['orphan_files_time'])) {
             $this->orphandFilesAdoptionTime = $options['processor']['orphan_files_time'];
         }
     }
     if (isset($options['processor']['limit']) && $options['processor']['limit']) {
         $this->setLimit($options['processor']['limit']);
     }
     if (isset($options['bulkInsert'])) {
         $this->bulkInsert = $options['bulkInsert'];
     }
     if (isset($options['processor']['order_lines_before_insert'])) {
         $this->orderLinesBeforeInsert = $options['processor']['order_lines_before_insert'];
     }
     if (isset($options['backup_path'])) {
         $this->backupPaths = $options['backup_path'];
     } else {
         $this->backupPaths = Billrun_Factory::config()->getConfigValue($this->getType() . '.backup_path', array('./backup/' . $this->getType()));
     }
 }
Example #3
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['availableFields'])) {
         $this->availableFields = $options['availableFields'];
     }
 }
Example #4
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['filename_regex'])) {
         $this->filenameRegex = $options['filename_regex'];
     }
     if (isset($options['receiver']['limit']) && $options['receiver']['limit']) {
         $this->setLimit($options['receiver']['limit']);
     }
     if (isset($options['receiver']['preserve_timestamps'])) {
         $this->preserve_timestamps = $options['receiver']['preserve_timestamps'];
     }
     if (isset($options['backup_path'])) {
         $this->backupPaths = $options['backup_path'];
     } else {
         $this->backupPaths = Billrun_Factory::config()->getConfigValue($this->getType() . '.backup_path', array('./backups/' . $this->getType()));
     }
     if (isset($options['receiver']['backup_granularity']) && $options['receiver']['backup_granularity']) {
         $this->setGranularity((int) $options['receiver']['backup_granularity']);
     }
     if (Billrun_Util::getFieldVal($options['receiver']['backup_date_fromat'], false)) {
         $this->setBackupDateDirFromat($options['receiver']['backup_date_fromat']);
     }
     if (isset($options['receiver']['orphan_time']) && (int) $options['receiver']['orphan_time'] > 900) {
         $this->file_fetch_orphan_time = $options['receiver']['orphan_time'];
     }
 }
Example #5
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['availableFields'])) {
         $this->availableFields = $options['availableFields'];
     }
     if (isset($options['extra_data'])) {
         $this->customerExtraData = $options['extra_data'];
     }
 }
Example #6
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     $configPath = Billrun_Factory::config()->getConfigValue($this->getType() . '.billrun.config_path');
     if ($configPath) {
         $config = new Yaf_Config_Ini($configPath);
         if (isset($config->billrun->exclude)) {
             $this->excludes = $config->billrun->exclude->toArray();
         }
     }
 }
Example #7
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['filename_regex'])) {
         $this->filenameRegex = $options['filename_regex'];
     }
     if (isset($options['receiver']['limit']) && $options['receiver']['limit']) {
         $this->setLimit($options['receiver']['limit']);
     }
     if (isset($options['receiver']['preserve_timestamps'])) {
         $this->preserve_timestamps = $options['receiver']['preserve_timestamps'];
     }
 }
Example #8
0
 public function __construct($options)
 {
     parent::__construct($options);
     if (isset($options['workspace'])) {
         $this->workspace = $options['workspace'];
     } else {
         $this->workspace = Billrun_Factory::config()->getConfigValue('response.workspace');
     }
     if (isset($options['backup'])) {
         $this->workspace = $options['backup'];
     } else {
         $defBackup = Billrun_Factory::config()->getConfigValue('response.backup');
         $this->workspace = Billrun_Factory::config()->getConfigValue(static::type . '.backup', $defBackup);
     }
 }
Example #9
0
 /**
  * constructor of the class
  * 
  * @param array $options the options of object load
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['calculator']['limit'])) {
         $this->limit = $options['calculator']['limit'];
     }
     if (isset($options['months_limit'])) {
         $this->months_limit = $options['months_limit'];
     }
     if (!isset($options['autoload']) || $options['autoload']) {
         $this->load();
     }
     if (isset($options['autosort'])) {
         $this->autosort = $options['autosort'];
     }
     $this->queue_coll = Billrun_Factory::db()->queueCollection();
 }
Example #10
0
 /**
  * constructor of the class
  * 
  * @param array $options the options of object load
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (isset($options['calculator']['limit'])) {
         $this->limit = $options['calculator']['limit'];
     }
     if (isset($options['months_limit'])) {
         $this->months_limit = $options['months_limit'];
     }
     if (!isset($options['autoload']) || $options['autoload']) {
         $this->load();
     }
     if (isset($options['autosort'])) {
         $this->autosort = $options['autosort'];
     }
     if (Billrun_Util::getFieldVal($options['calculator']['rates_query'], false)) {
         $this->rates_query = Billrun_Util::getFieldVal($options['calculator']['rates_query'], array());
     }
     $this->queue_coll = Billrun_Factory::db()->queueCollection();
 }
Example #11
0
 /**
  * constructor
  * 
  * @param array $options parameters for the generator to dynamically behaiour
  */
 public function __construct($options)
 {
     parent::__construct($options);
     if (isset($options['export_directory'])) {
         if (!isset($options['disable_stamp_export_directory']) || !$options['disable_stamp_export_directory']) {
             $this->export_directory = $options['export_directory'] . DIRECTORY_SEPARATOR . $this->stamp;
         } else {
             $this->export_directory = $options['export_directory'];
         }
     } else {
         $this->export_directory = Billrun_Factory::config()->getConfigValue(static::$type . '.export') . DIRECTORY_SEPARATOR . $this->stamp;
         //__DIR__ . '/../files/';
     }
     if (isset($options['auto_create_dir'])) {
         $this->auto_create_dir = $options['auto_create_dir'];
     }
     $this->loadBalanced = Billrun_Factory::config()->getConfigValue('generate.loadBalanced', 0);
     if ($this->auto_create_dir && !file_exists($this->export_directory)) {
         mkdir($this->export_directory, 0777, true);
     }
 }