Пример #1
0
<?php

namespace Phperf\Xhprof;

use Yaoi\Database;
use Yaoi\Log;
require_once __DIR__ . '/../vendor/autoload.php';
$dbFilePath = sys_get_temp_dir() . '/xh-tests.sqlite';
register_shutdown_function(function () use($dbFilePath) {
    unlink($dbFilePath);
});
Database::register('sqlite:///' . $dbFilePath);
unset($dbFilePath);
Entity\Migrations::create()->run();
Database::getInstance()->log(new Log('colored-stdout'));
Пример #2
0
<?php

namespace Phperf\Xhprof;

use Phperf\Xhprof\Entity\Migrations;
use Yaoi\Log;
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/env/conf.php';
$log = new Log('colored-stdout');
Migrations::create()->run($log);