Usage inside the PHP code¶
Benchmarking¶
\Krexx::timerMoment('get all rows');
$notizs = $this->notizRepository->findByPageId($GLOBALS['TSFE']->id);
\Krexx::timerMoment('assign rows to view');
$this->view->assign('notizs', $notizs);
\Krexx::timerEnd();
Fatal error handler¶
// register the fatal error handler
\Krexx::registerFatal();
// call undefined function to cause an error
undefinedFunctionCall();
// unregister the fatal error handler
\Krexx::unregisterFatal();
Scope analysis¶
Often enough a kreXX call will look like this:
krexx($this);
Analysing “$this” means, that all protected and private values and methods are reachable from this point inside the code. When kreXX notices this, it will analyse all reachable variables and methods of this class.