Esempio n. 1
0
<?php

session_start();
require_once __DIR__ . '/app/Config.php';
require_once ROOT_DIR . '/vendor/autoload.php';
require_once ROOT_DIR . '/app/App.php';
$app = new App();
$app->init();
$app->process();
$app->render();
$app->terminate();
Esempio n. 2
0
 protected function renderCsv()
 {
     $key = $this->grid->getInputProcessor()->getUniqueRequestId();
     $caching_time = $this->grid->getConfig()->getCachingTime();
     if ($caching_time and $output = Cache::get($key)) {
         $this->output = $output;
     } else {
         set_time_limit(0);
         // force to prepare columns hider component
         $this->grid->getConfig()->getComponentByNameRecursive('columns_hider')->prepare();
         $this->grid->getConfig()->getDataProvider()->setPageSize(PHP_INT_MAX);
         $this->grid->getConfig()->initialize($this->grid);
         $provider = $this->grid->getConfig()->getDataProvider();
         $provider->reset();
         $this->output = '';
         $this->renderHeader();
         $this->renderBody();
         if ($caching_time) {
             Cache::put($key, $this->output, $caching_time);
         }
     }
     $response = \Response::make($this->output);
     $this->setCsvHeaders($response);
     $response->send();
     \App::terminate(\Request::instance(), $response);
 }