Example #1
0
 /**
  * Log / Echo message.
  *
  * @param string $message Message to log.
  * @param string $method  Method that called this.
  * @param int    $level   Logger severity level constant.
  * @param string $color   ColorCLI method name.
  */
 private function log($message, $method, $level, $color)
 {
     if ($this->_echoCLI) {
         $this->_colorCLI->doEcho($this->_colorCLI->{$color}($message), true);
     }
     if ($this->_debug) {
         $this->_debugging->log('Binaries', $method, $message, $level);
     }
 }
Example #2
0
 /**
  * @note Disable group that does not exist on USP server
  * @param $id
  *
  * @return string
  */
 public function disableIfNotExist($id)
 {
     $this->pdo->queryExec(sprintf("UPDATE groups SET active = 0 WHERE id = %d", $id));
     $this->colorCLI->doEcho($this->colorCLI->error('Group does not exist on server, disabling'));
 }