public function init($initialiser = null) { $toolbarConfig = $this->config("bundl\\debugtoolbar"); $baseUrl = $toolbarConfig->getStr("base_url", '/_debugbar'); if (starts_with($baseUrl, '/')) { $passthroughs = $this->config("dispatch")->getArr("passthrough"); if (!isset($passthroughs[substr($baseUrl, 1)])) { throw new \Exception("Please add the following to your defaults.ini within [dispatch]\n" . "passthrough[" . substr($baseUrl, 1) . "] = " . "../vendor/maximebf/debugbar/src/DebugBar/Resources"); } } EventManager::listen(EventManager::CUBEX_WEBPAGE_RENDER_BODY, [$this, "renderBody"]); EventManager::listen(EventManager::CUBEX_WEBPAGE_RENDER_HEAD, [$this, "renderHead"]); EventManager::listen(EventManager::CUBEX_LOG, [$this, "catchLog"]); $this->_debugBar = new DebugBar(); $this->_debugBar->addCollector(new PhpInfoCollector()); $this->_debugBar->addCollector(new MessagesCollector()); $this->_debugBar->addCollector(new TranslationDataCollector()); $this->_debugBar->addCollector(new RequestDataCollector()); $this->_debugBar->addCollector(new CubexCoreTimeData()); $this->_debugBar->addCollector(new CassandraDataCollector()); $this->_debugBar->addCollector(new QueryDataCollector()); $this->_debugBar->addCollector(new MemoryCollector()); $this->_debugBar->addCollector(new ExceptionsCollector()); $this->_debugRender = $this->_debugBar->getJavascriptRenderer(); $this->_debugRender->setBaseUrl($baseUrl); }
public function __construct($requestStartTime = null) { parent::__construct($requestStartTime); if (class_exists('\\Cubex\\Cassandra\\ColumnFamily')) { EventManager::listen(\Cubex\Cassandra\ColumnFamily::QUERY_EVENT, [$this, "getQuery"]); } }
public function __construct() { $this->_stopwatchCollection = new StopwatchCollection(); $this->_profilingStats = new ProfilingStats(); $this->_stopwatchCollection->setDisplayAllInReport(false); $this->_addDefaultTimers(); EventManager::listen(Events::DISPLAY_REPORT_END, [$this, 'displayReport']); }
public function __construct($requestStartTime = null) { parent::__construct($requestStartTime); EventManager::listen(EventManager::CUBEX_TIMETRACK_START, [$this, "trackStart"]); EventManager::listen(EventManager::CUBEX_TIMETRACK_END, [$this, "trackEnd"]); //$this->addMeasure("Starting Project", PHP_START, microtime(true)); $this->startMeasure("project.dispatch", "Dispatching Project"); }
public function init($initialiser = null) { EventManager::listen(EventManager::CUBEX_QUERY, function (IEvent $e) { if (CUBEX_CLI) { Log::debug("Query: " . $e->getStr("query")); } else { var_dump($e->getStr("query")); } }); }
public function init($initialiser = null) { $config = Container::config()->get("rollbar", new Config()); $token = $config->getStr("post_server_item", null); $this->_logLevel = $config->getStr("log_level", LogLevel::WARNING); $config = ['access_token' => $token, 'environment' => CUBEX_ENV, 'root' => CUBEX_PROJECT_ROOT]; if (class_exists('\\Bundl\\Sidekix\\SidekixBundl')) { $info = SidekixBundl::getDiffuseVersionInfo(); if ($info && isset($info['version'])) { $config['code_version'] = $info['version']; } } // installs global error and exception handlers \Rollbar::init($config); EventManager::listen(EventManager::CUBEX_LOG, [$this, "log"]); }
public function __construct($requestStartTime = null) { parent::__construct($requestStartTime); EventManager::listen(EventManager::CUBEX_QUERY, [$this, "getQuery"]); }
public function init($initialiser = null) { EventManager::listen(EventManager::CUBEX_PROJECT_PREPARE, [$this, "projectPrepare"]); }
public function __construct() { EventManager::listen(RequestDataCollector::REQUESTDATACOLLECTOR_ADDITIONAL, [$this, "addAdditionalEvent"]); }