You are here

class AutobanUtils in Automatic IP ban (Autoban) 8

Class AutobanUtils.

Provides utils.

Hierarchy

Expanded class hierarchy of AutobanUtils

4 files declare their use of AutobanUtils
AutobanAnalyzeForm.php in src/Form/AutobanAnalyzeForm.php
AutobanController.php in src/Controller/AutobanController.php
AutobanFormBase.php in src/Form/AutobanFormBase.php
Class AutobanFormBase.
AutobanTestForm.php in src/Form/AutobanTestForm.php

File

src/AutobanUtils.php, line 17
Contains \Drupal\autoban\Utils.

Namespace

Drupal\autoban
View source
class AutobanUtils {
  const AUTOBAN_USER_ANY = 0;
  const AUTOBAN_USER_ANONYMOUS = 1;
  const AUTOBAN_USER_AUTHENTICATED = 2;
  const AUTOBAN_FROM_ANALYZE = '*from_analyze*';
  const AUTOBAN_RULE_ANY = 0;
  const AUTOBAN_RULE_MANUAL = 1;
  const AUTOBAN_RULE_AUTO = 2;

  /**
   * Is from Analyze page.
   *
   * @param string $string
   *   Autoban string.
   *
   * @return bool
   *   Is from analyze?
   */
  public static function isFromAnalyze($string) {
    return trim($string) === self::AUTOBAN_FROM_ANALYZE;
  }

}

Members