| 1 |
<?php |
| 2 |
/** |
| 3 |
* RegEx service interface |
| 4 |
* |
| 5 |
* @package SeQura/WC |
| 6 |
* @subpackage SeQura/WC/Services |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace SeQura\WC\Services\Regex; |
| 10 |
|
| 11 |
/** |
| 12 |
* Define methods to get regular expressions to validate data |
| 13 |
*/ |
| 14 |
interface Interface_Regex { |
| 15 |
|
| 16 |
/** |
| 17 |
* Get regular expression to validate an IPv4 or IPv6 address |
| 18 |
*/ |
| 19 |
public function ip( bool $include_slashes = true ): string; |
| 20 |
|
| 21 |
/** |
| 22 |
* Get regular expression to validate a date or duration following ISO 8601 |
| 23 |
*/ |
| 24 |
public function date_or_duration( bool $include_slashes = true ): string; |
| 25 |
} |
| 26 |
|