38b7a0d1f00e4cb96f808f5c9b35141fd7936d10
[yaffs-website] / vendor / behat / behat / src / Behat / Testwork / Hook / Call / HookCall.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\Hook\Call;
12
13 use Behat\Testwork\Environment\Call\EnvironmentCall;
14 use Behat\Testwork\Hook\Hook;
15 use Behat\Testwork\Hook\Scope\HookScope;
16
17 /**
18  * Represents a hook call.
19  *
20  * @author Konstantin Kudryashov <ever.zet@gmail.com>
21  */
22 final class HookCall extends EnvironmentCall
23 {
24     /**
25      * @var HookScope
26      */
27     private $scope;
28
29     /**
30      * Initializes hook call.
31      *
32      * @param HookScope    $scope
33      * @param Hook         $hook
34      * @param null|integer $errorReportingLevel
35      */
36     public function __construct(HookScope $scope, Hook $hook, $errorReportingLevel = null)
37     {
38         parent::__construct($scope->getEnvironment(), $hook, array($scope), $errorReportingLevel);
39
40         $this->scope = $scope;
41     }
42
43     /**
44      * Returns hook scope.
45      *
46      * @return HookScope
47      */
48     public function getScope()
49     {
50         return $this->scope;
51     }
52 }