/**
  * {@inheritdoc}
  */
 public function onKeyPress($keyCode)
 {
     switch ($keyCode) {
         // enter
         case 13:
             VarDumpNcurses::dump($this->applicationConfig, "Application Config", false);
             return true;
             break;
     }
     return false;
 }
 /**
  * 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;
 }
Exemple #3
0
 /**
  * Dumps a var
  * @param mixed $var var to dump
  * @param string $name [optional] var name
  */
 function bzdump($var, $name = "unknown var name")
 {
     if ("cli" == PHP_SAPI) {
         // command line
         if (extension_loaded("ncurses")) {
             // ncurses dump
             VarDumpNcurses::dump($var, $name);
         } else {
             // regular var_dump()
             var_dump($var);
         }
     } elseif (array_key_exists("HTTP_X_REQUESTED_WITH", $_SERVER) && "XMLHttpRequest" == $_SERVER["HTTP_X_REQUESTED_WITH"]) {
         // firephp dump
         VarDumpFirePhp::dump($var, $name);
     } else {
         // html dump
         VarDumpHtml::dump($var, $name);
     }
 }
 /**
  * {@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;
 }