1 | <?php |
||
16 | class RegexFacade |
||
17 | { |
||
18 | |||
19 | const PCRE = '\Gobie\Regex\Wrappers\Pcre\PcreRegex'; |
||
20 | |||
21 | const MB = '\Gobie\Regex\Wrappers\Mb\MbRegex'; |
||
22 | |||
23 | /** |
||
24 | * Class name of regex driver. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private $driverClass; |
||
29 | |||
30 | /** |
||
31 | * @param string $driverClass Fully qualified class |
||
32 | */ |
||
33 | 6 | public function __construct($driverClass) |
|
37 | |||
38 | /** |
||
39 | * Redirects object calls to static methods of the driver. |
||
40 | * |
||
41 | * @param string $name Method |
||
42 | * @param array $arguments Arguments |
||
43 | * @return mixed Whatever is returned from drivers |
||
44 | * @throws \BadMethodCallException When driver doesn't implement requested functionality |
||
45 | */ |
||
46 | 4 | public function __call($name, $arguments) |
|
54 | |||
55 | /** |
||
56 | * Getter for driver class name. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | 2 | public function getDriverClass() |
|
64 | } |
||
65 |