isDbEnabled() public method

Check if user required the db connection
public isDbEnabled ( ) : boolean
return boolean
Example #1
0
 /**
  * Pre-execute command
  *
  * @return \Longman\TelegramBot\Entities\ServerResponse
  * @throws \Longman\TelegramBot\Exception\TelegramException
  */
 public function preExecute()
 {
     if ($this->need_mysql && !($this->telegram->isDbEnabled() && DB::isDbConnected())) {
         return $this->executeNoDb();
     }
     return $this->execute();
 }