Exemplo n.º 1
0
 /**
  * Constructeur
  *
  * @param Conf    $config  The configuration to build the csv (maximum length,
  * delimiter and the enclosure)
  * @param Columns $columns The columns configuration
  */
 public function __construct(Conf $config, Columns $columns)
 {
     if (!isset($config->length)) {
         $config->length = 0;
     }
     if (!isset($config->delimiter)) {
         $config->delimiter = ',';
     }
     if (!isset($config->enclosure)) {
         $config->enclosure = '"';
     }
     parent::__construct($config, $columns);
 }
Exemplo n.º 2
0
 /**
  * Prepare the fetch
  *
  * @return self
  */
 public function fetch()
 {
     return $this->driver->getResponse($this['format']->format($this->source->getData()), $this->source->getCount(), $this->source->getFilteredCount());
 }