| Total Complexity | 9 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class AjaxCondition implements ConditionInterface { |
||
| 18 | /** |
||
| 19 | * Ajax action to check against. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $action = ''; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Flag whether to check against ajax actions which run for authenticated users. |
||
| 27 | * |
||
| 28 | * @var boolean |
||
| 29 | */ |
||
| 30 | protected $private = true; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Flag whether to check against ajax actions which run for unauthenticated users. |
||
| 34 | * |
||
| 35 | * @var boolean |
||
| 36 | */ |
||
| 37 | protected $public = false; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Constructor |
||
| 41 | * |
||
| 42 | * @codeCoverageIgnore |
||
| 43 | * @param string $action |
||
| 44 | * @param boolean $private |
||
| 45 | * @param boolean $public |
||
| 46 | */ |
||
| 47 | public function __construct( $action, $private = true, $public = false ) { |
||
| 48 | $this->action = $action; |
||
| 49 | $this->private = $private; |
||
| 50 | $this->public = $public; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritDoc} |
||
| 55 | */ |
||
| 56 | public function isSatisfied( RequestInterface $request ) { |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * {@inheritDoc} |
||
| 71 | */ |
||
| 72 | public function getArguments( RequestInterface $request ) { |
||
| 76 |