You are here

class TrustedMethods in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\TrustedMethods
  2. 10 core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php \Drupal\Tests\Core\Security\TrustedMethods

Hierarchy

Expanded class hierarchy of TrustedMethods

File

core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php, line 133

Namespace

Drupal\Tests\Core\Security
View source
class TrustedMethods implements TrustedCallbackInterface {
  public static function trustedCallbacks() {
    return [
      'callback',
    ];
  }
  public static function callback() {
    return 'test';
  }
  public static function unTrustedCallback() {
    return 'test';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.
TrustedCallbackInterface::TRIGGER_WARNING constant Untrusted callbacks trigger E_USER_WARNING errors.
TrustedMethods::callback public static function
TrustedMethods::trustedCallbacks public static function Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface::trustedCallbacks
TrustedMethods::unTrustedCallback public static function