/** * Constructor * @param int $padPositionX x position of the pad in the main screen * @param int $padPositionY y position of the pad in the main screen * @param float $startMicrotime start time of the process * @param \Bugzorcist\Profiler\DataProfiler\DataProfilerManager $dataProfilerManager data profiler manager */ public function __construct($padPositionX, $padPositionY, $startMicrotime, DataProfilerManager $dataProfilerManager = null) { parent::__construct($padPositionX, $padPositionY); $this->dataProfilerManager = $dataProfilerManager; $this->startMicrotime = $startMicrotime; if (null === $dataProfilerManager) { return; } foreach ($dataProfilerManager as $idProfiler => $profiler) { $this->addExpandableElement($idProfiler); } }
/** * Key press event handler * @param int $keyCode code of the pressed key * @return boolean true if a resize is needed, false otherwise */ public function onKeyPress($keyCode) { switch ($keyCode) { // enter key case 13: $name = $this->varPosList[$this->getCursorPositionY()]; $var = $this->varList[$name]; VarDumpNcurses::dump($var, $name, false); return true; break; default: parent::onKeyPress($keyCode); } return false; }
/** * {@inheritdoc} */ public function onKeyPress($keyCode) { switch ($keyCode) { // enter key case 13: // show profile params if (array_key_exists($this->getCursorPositionY(), $this->profileParamsList)) { $params = $this->profileParamsList[$this->getCursorPositionY()]; VarDumpNcurses::dump($params, "Params", false); return true; } else { parent::onKeyPress($keyCode); } break; default: parent::onKeyPress($keyCode); } return false; }