Security update for permissions_by_term
[yaffs-website] / vendor / behat / behat / src / Behat / Behat / Definition / Pattern / Pattern.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;
12
13 /**
14  * Step definition pattern.
15  *
16  * @author Konstantin Kudryashov <ever.zet@gmail.com>
17  */
18 final class Pattern
19 {
20     /**
21      * @var string
22      */
23     private $canonicalText;
24     /**
25      * @var string
26      */
27     private $pattern;
28     /**
29      * @var integer
30      */
31     private $placeholderCount;
32
33     /**
34      * Initializes pattern.
35      *
36      * @param string  $canonicalText
37      * @param string  $pattern
38      * @param integer $placeholderCount
39      */
40     public function __construct($canonicalText, $pattern, $placeholderCount = 0)
41     {
42         $this->canonicalText = $canonicalText;
43         $this->pattern = $pattern;
44         $this->placeholderCount = $placeholderCount;
45     }
46
47     /**
48      * Returns canonical step text.
49      *
50      * @return string
51      */
52     public function getCanonicalText()
53     {
54         return $this->canonicalText;
55     }
56
57     /**
58      * Returns pattern.
59      *
60      * @return string
61      */
62     public function getPattern()
63     {
64         return $this->pattern;
65     }
66
67     /**
68      * Returns pattern placeholder count.
69      *
70      * @return integer
71      */
72     public function getPlaceholderCount()
73     {
74         return $this->placeholderCount;
75     }
76 }