1 : <?php
2 :
3 : /**
4 : * XSLT Benchmarking
5 : * @link https://github.com/masicek/XSLT-Benchmarking
6 : * @author Viktor Mašíček <viktor@masicek.net>
7 : * @license "New" BSD License
8 : */
9 :
10 : namespace XSLTBenchmarking\TestsRunner;
11 :
12 : require_once LIBS . '/PhpPath/PhpPath.min.php';
13 : require_once ROOT . '/DriversContainer.php';
14 :
15 : use PhpPath\P;
16 :
17 : /**
18 : * Object for work with params of test
19 : *
20 : * @author Viktor Mašíček <viktor@masicek.net>
21 : */
22 : class Params extends \XSLTBenchmarking\DriversContainer
23 : {
24 :
25 :
26 : /**
27 : * Choose the params driver by extension
28 : *
29 : * @param string $paramsFilePath The path of the file with deffinition of generated tests
30 : * @param bool $read Flag, for reading the params
31 : *
32 : * @throws \XSLTBenchmarking\InvalidArgumentException Wrong format of file with params
33 : */
34 : public function setFile($paramsFilePath, $read = TRUE)
35 : {
36 1 : $extension = pathinfo($paramsFilePath, PATHINFO_EXTENSION);
37 1 : return $this->setDriver($extension, $paramsFilePath, $read);
38 : }
39 :
40 :
41 : }
|