Пример #1
0
 function PEAR_Frontend_CLI()
 {
     parent::PEAR();
     $term = getenv('TERM');
     //(cox) $_ENV is empty for me in 4.1.1
     if (function_exists('posix_isatty') && !posix_isatty(1)) {
         // output is being redirected to a file or through a pipe
     } elseif ($term) {
         if (preg_match('/^(xterm|vt220|linux)/', $term)) {
             $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109);
             $this->term['normal'] = sprintf("%c%c%c", 27, 91, 109);
         } elseif (preg_match('/^vt100/', $term)) {
             $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0);
             $this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0);
         }
     } elseif (OS_WINDOWS) {
         // XXX add ANSI codes here
     }
 }
Пример #2
0
 function PEAR_Frontend_Web()
 {
     parent::PEAR();
     $this->config =& $GLOBALS['_PEAR_Frontend_Web_config'];
 }