Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Transformation / Call / RuntimeTransformation.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\Transformation\Call;
12
13 use Behat\Behat\Transformation\Transformation;
14 use Behat\Testwork\Call\RuntimeCallee;
15
16 /**
17  * Transformation that is created and executed in the runtime.
18  *
19  * @deprecated Will be removed in 4.0. Use specific transformations instead
20  *
21  * @author Konstantin Kudryashov <ever.zet@gmail.com>
22  */
23 final class RuntimeTransformation extends RuntimeCallee implements Transformation
24 {
25     /**
26      * @var string
27      */
28     private $pattern;
29
30     /**
31      * Initializes transformation.
32      *
33      * @param string      $pattern
34      * @param callable    $callable
35      * @param null|string $description
36      */
37     public function __construct($pattern, $callable, $description = null)
38     {
39         $this->pattern = $pattern;
40
41         parent::__construct($callable, $description);
42     }
43
44     /**
45      * {@inheritdoc}
46      */
47     public function getPattern()
48     {
49         return $this->pattern;
50     }
51
52     /**
53      * {@inheritdoc}
54      */
55     public function __toString()
56     {
57         return 'Transform ' . $this->getPattern();
58     }
59 }