Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / EventDispatcher / Event / LifecycleEvent.php
1 <?php
2
3 /*
4  * This file is part of the Behat Testwork.
5  * (c) Konstantin Kudryashov <ever.zet@gmail.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 namespace Behat\Testwork\EventDispatcher\Event;
12
13 use Behat\Testwork\Environment\Environment;
14 use Behat\Testwork\Suite\Suite;
15 use Symfony\Component\EventDispatcher\Event;
16
17 /**
18  * Represents an event which holds references to current suite and environment.
19  *
20  * @author Konstantin Kudryashov <ever.zet@gmail.com>
21  */
22 abstract class LifecycleEvent extends Event
23 {
24     /**
25      * @var Environment
26      */
27     private $environment;
28
29     /**
30      * Initializes scenario event.
31      *
32      * @param Environment $env
33      */
34     public function __construct(Environment $env)
35     {
36         $this->environment = $env;
37     }
38
39     /**
40      * Returns suite in which this event was fired.
41      *
42      * @return Suite
43      */
44     public function getSuite()
45     {
46         return $this->environment->getSuite();
47     }
48
49     /**
50      * Returns environment in which this event was fired.
51      *
52      * @return Environment
53      */
54     public function getEnvironment()
55     {
56         return $this->environment;
57     }
58 }