Esempio n. 1
0
 public function __construct()
 {
     // We obviously need this
     if (!extension_loaded('ncurses')) {
         echo "ncurses extension not loaded\n";
         $this->loaded = false;
         exit(1);
     }
     // Start ncurses
     ncurses_init();
     ncurses_timeout(0);
 }
 public function __construct(Linfo $linfo)
 {
     $this->linfo = $linfo;
     // We obviously need this
     if (!extension_loaded('ncurses')) {
         $this->loaded = false;
         throw new LinfoFatalException('ncurses extension not loaded');
     }
     // Start ncurses
     ncurses_init();
     ncurses_timeout(0);
 }
Esempio n. 3
0
 public function __construct(Linfo $linfo)
 {
     $this->linfo = $linfo;
     // We obviously need this
     if (!extension_loaded('ncurses')) {
         $this->loaded = false;
         throw new FatalException("PHP ncurses extension not loaded.\nRefer to http://php.net/manual/en/ncurses.installation.php for details.");
     }
     // Start ncurses
     ncurses_init();
     ncurses_start_color();
     ncurses_init_pair(1, NCURSES_COLOR_YELLOW, NCURSES_COLOR_BLUE);
     ncurses_timeout(0);
 }