blob: e4fd28382ea9ca81cbc5d27216c6c6404aab57da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<?php
namespace Drupal\Core\Security;
/**
* Interface to declare trusted callbacks.
*
* @see \Drupal\Core\Security\DoTrustedCallbackTrait
*/
interface TrustedCallbackInterface {
/**
* Untrusted callbacks throw exceptions.
*/
const THROW_EXCEPTION = 'exception';
/**
* Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.
*/
const TRIGGER_SILENCED_DEPRECATION = 'silenced_deprecation';
/**
* Lists the trusted callbacks provided by the implementing class.
*
* Trusted callbacks are public methods on the implementing class and can be
* invoked via
* \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback().
*
* @return string[]
* List of method names implemented by the class that can be used as trusted
* callbacks.
*
* @see \Drupal\Core\Security\DoTrustedCallbackTrait::doTrustedCallback()
*/
public static function trustedCallbacks();
}
|