Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Definition / Pattern / Policy / PatternPolicy.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\Pattern\Policy;
12
13 use Behat\Behat\Definition\Pattern\Pattern;
14 use Behat\Behat\Definition\Pattern\PatternTransformer;
15
16 /**
17  * Defines a way to handle custom definition patterns.
18  *
19  * @see PatternTransformer
20  *
21  * @author Konstantin Kudryashov <ever.zet@gmail.com>
22  */
23 interface PatternPolicy
24 {
25     /**
26      * Checks if policy supports pattern type.
27      *
28      * @param string $type
29      *
30      * @return Boolean
31      */
32     public function supportsPatternType($type);
33
34     /**
35      * Generates pattern for step text.
36      *
37      * @param string $stepText
38      *
39      * @return Pattern
40      */
41     public function generatePattern($stepText);
42
43     /**
44      * Checks if policy supports pattern.
45      *
46      * @param string $pattern
47      *
48      * @return Boolean
49      */
50     public function supportsPattern($pattern);
51
52     /**
53      * Transforms pattern string to regex.
54      *
55      * @param string $pattern
56      *
57      * @return string
58      */
59     public function transformPatternToRegex($pattern);
60 }