Merge pull request #15778 from agh1/reminder-do-not-email-test
[civicrm-core.git] / Civi / API / Event / AuthorizeEvent.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 namespace Civi\API\Event;
13
14 /**
15 * Class AuthorizeEvent
16 * @package Civi\API\Event
17 */
18 class AuthorizeEvent extends Event {
19 /**
20 * @var bool
21 */
22 private $authorized = FALSE;
23
24 /**
25 * Mark the request as authorized.
26 */
27 public function authorize() {
28 $this->authorized = TRUE;
29 }
30
31 /**
32 * @return bool
33 * TRUE if the request has been authorized.
34 */
35 public function isAuthorized() {
36 return $this->authorized;
37 }
38
39 }