Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Definition / Call / RuntimeDefinition.php
1 <?php
2
3 /*
4  * This file is part of the Behat.
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\Behat\Definition\Call;
12
13 use Behat\Behat\Definition\Definition;
14 use Behat\Testwork\Call\RuntimeCallee;
15
16 /**
17  * Represents a step definition created and executed in the runtime.
18  *
19  * @author Konstantin Kudryashov <ever.zet@gmail.com>
20  */
21 abstract class RuntimeDefinition extends RuntimeCallee implements Definition
22 {
23     /**
24      * @var string
25      */
26     private $type;
27     /**
28      * @var string
29      */
30     private $pattern;
31
32     /**
33      * Initializes definition.
34      *
35      * @param string      $type
36      * @param string      $pattern
37      * @param callable    $callable
38      * @param null|string $description
39      */
40     public function __construct($type, $pattern, $callable, $description = null)
41     {
42         $this->type = $type;
43         $this->pattern = $pattern;
44
45         parent::__construct($callable, $description);
46     }
47
48     /**
49      * {@inheritdoc}
50      */
51     public function getType()
52     {
53         return $this->type;
54     }
55
56     /**
57      * {@inheritdoc}
58      */
59     public function getPattern()
60     {
61         return $this->pattern;
62     }
63
64     /**
65      * {@inheritdoc}
66      */
67     public function __toString()
68     {
69         return $this->getType() . ' ' . $this->getPattern();
70     }
71 }