123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- declare(strict_types=1);
- namespace OCP\Security\FeaturePolicy;
- use OC\Security\FeaturePolicy\FeaturePolicyManager;
- use OCP\AppFramework\Http\EmptyFeaturePolicy;
- use OCP\EventDispatcher\Event;
- class AddFeaturePolicyEvent extends Event {
-
- private $policyManager;
-
- public function __construct(FeaturePolicyManager $policyManager) {
- parent::__construct();
- $this->policyManager = $policyManager;
- }
-
- public function addPolicy(EmptyFeaturePolicy $policy) {
- $this->policyManager->addDefaultPolicy($policy);
- }
- }
|