Ejemplo n.º 1
0
 public function testParseConfig()
 {
     $kernel = new Kernel(__DIR__ . '/../fixtures/config_sandbox');
     $kernel->loadContainer();
     $container = $kernel->getContainer();
     $container->setParameter('src_path', __DIR__ . '/../fixtures/reports/report1');
     $request = new Request();
     $response = $kernel->handle($request);
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
 }
Ejemplo n.º 2
0
<?php

use Symfony\Component\HttpFoundation\Request;
use RG\Kernel;
chdir(__DIR__);
require __DIR__ . '/../vendor/autoload.php';
$configPath = __DIR__ . '/../app/config/';
$request = Request::createFromGlobals();
$kernel = new Kernel($configPath);
$kernel->loadContainer();
$container = $kernel->getContainer();
$reportService = $container->get('report_service');
$reportService->warmupReport();
$report = $reportService->getReport();
if (method_exists($report, 'aggregate')) {
    echo "Start aggregation...\n";
    $report->aggregate();
} else {
    echo "The report does not have an aggregation method\n";
}
Ejemplo n.º 3
0
<?php

use Symfony\Component\HttpFoundation\Request;
use RG\Kernel;
require __DIR__ . '/../vendor/autoload.php';
$configPath = __DIR__ . '/../app/config/';
$request = Request::createFromGlobals();
$kernel = new Kernel($configPath);
$kernel->loadContainer();
$response = $kernel->handle($request);
$response->send();