Example #1
0
 /**
  * Constructor - initializes the writer.
  * @param array $config the configuration for this writer.
  */
 public function init(Configuration $config)
 {
     parent::init($config);
     $this->fileLocation = $config->get('file', null);
     $this->delimiter = $config->get('delimiter', ',');
     $this->setLayout(new Bind());
 }
Example #2
0
 /**
  * Constructor - initializes the file writer, layout and sets
  * the timespan
  * @param array $config the configuration for this writer.
  */
 public function init(Configuration $config)
 {
     parent::init($config);
     //sort out the layout and file location etc.
     //set timespan, default is daily.
     $timespan = $this->getConfig()->timespan;
     $this->timespan = isset($timespan) ? $timespan : TimeSpanFile::DAILY;
 }