1 | <?php |
||
13 | class AbstractRegexType extends StringType |
||
14 | { |
||
15 | |||
16 | const REGEX_DEFAULT_START = '(?:=('; |
||
17 | const REGEX_DEFAULT_END = '))?'; |
||
18 | |||
19 | /** |
||
20 | * The raw regular expression to use. |
||
21 | * Exclude start (`^`) and end (`$`) anchors. |
||
22 | * @var string |
||
23 | */ |
||
24 | private $regex = null; |
||
25 | |||
26 | /** |
||
27 | * Construct and setup the regular expression for this type |
||
28 | * |
||
29 | * @param \SwaggerGen\Swagger\AbstractObject $parent |
||
30 | * @param string $definition |
||
31 | * @param string $regex |
||
32 | */ |
||
33 | public function __construct(\SwaggerGen\Swagger\AbstractObject $parent, $definition, $type, $regex) |
||
40 | |||
41 | protected function parseDefinition($definition) |
||
57 | |||
58 | protected function validateDefault($value) |
||
68 | |||
69 | } |
||
70 |