original_string: protected function dbDelete($category, $key = null)
      {
          if ($key === null) {
              $this->getDb()->createCommand('
                  DELETE FROM
                      {{setting}}
                  WHERE
                      `category` = :category
              ', compact('category'))->execute();
          }
  
          if (is_string($key)) {
              $this->getDb()->createCommand('
                      DELETE FROM
                          {{setting}}
                      WHERE
                          `category` = :category
                          AND `key` = :key
                  ', compact('category', 'key'))->execute();
          }
  
          if (is_array($key)) {
              foreach ($key as $val) {
                  $this->dbDelete($category, $val);
              }
          }
      }
code: protected function dbDelete($category, $key = null)
      {
          if ($key === null) {
              $this->getDb()->createCommand('
                  DELETE FROM
                      {{setting}}
                  WHERE
                      `category` = :category
              ', compact('category'))->execute();
          }
  
          if (is_string($key)) {
              $this->getDb()->createCommand('
                      DELETE FROM
                          {{setting}}
                      WHERE
                          `category` = :category
                          AND `key` = :key
                  ', compact('category', 'key'))->execute();
          }
  
          if (is_array($key)) {
              foreach ($key as $val) {
                  $this->dbDelete($category, $val);
              }
          }
      }
code_tokens: protected function dbDelete ( $ category , $ key = null ) { if ( $ key === null ) { $ this -> getDb ( ) -> createCommand ( '
                  DELETE FROM
                      {{setting}}
                  WHERE
                      `category` = :category
              ' , compact ( 'category' ) ) -> execute ( ) ; } if ( is_string ( $ key ) ) { $ this -> getDb ( ) -> createCommand ( '
                      DELETE FROM
                          {{setting}}
                      WHERE
                          `category` = :category
                          AND `key` = :key
                  ' , compact ( 'category' , 'key' ) ) -> execute ( ) ; } if ( is_array ( $ key ) ) { foreach ( $ key as $ val ) { $ this -> dbDelete ( $ category , $ val ) ; } } }
docstring: Deletes setting from database
  
  @param string|array $category Category name(s)
  @param string|array|null $key Setting key(s) or null to delete all values from category
  @throws \yii\db\Exception
docstring_tokens: Deletes setting from database