@@ -19,12 +19,12 @@ |
||
| 19 | 19 | $this->functionSet = $functionSet; |
| 20 | 20 | |
| 21 | 21 | $this->translators = [ |
| 22 | - Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//' . $prefix . $string; }, |
|
| 23 | - '' => function($string) use ($prefix) { return '/' . $prefix . $string; }, |
|
| 24 | - Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/' . $prefix . $string; }, |
|
| 25 | - Tokenizer::NUM_SIGN => function($string) { return '[@id=\'' . $string . '\']'; }, |
|
| 26 | - Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' ' . $string . ' \')]'; }, |
|
| 27 | - Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '[' .'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \'' . json_encode($string) . '\', ., "' . $hash . '")' . ']'; } |
|
| 22 | + Tokenizer::WHITESPACE => function($string) use ($prefix) { return '//'.$prefix.$string; }, |
|
| 23 | + '' => function($string) use ($prefix) { return '/'.$prefix.$string; }, |
|
| 24 | + Tokenizer::GREATER_THAN => function($string) use ($prefix) { return '/'.$prefix.$string; }, |
|
| 25 | + Tokenizer::NUM_SIGN => function($string) { return '[@id=\''.$string.'\']'; }, |
|
| 26 | + Tokenizer::DOT => function($string) { return '[contains(concat(\' \', normalize-space(@class), \' \'), \' '.$string.' \')]'; }, |
|
| 27 | + Tokenizer::OPEN_SQUARE_BRACKET => function($string) use ($hash) { return '['.'php:function(\'\Transphporm\Parser\CssToXpath::processAttr\', \''.json_encode($string).'\', ., "'.$hash.'")'.']'; } |
|
| 28 | 28 | ]; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | |
| 85 | 85 | private function import($args, $indexStart) { |
| 86 | 86 | $fileName = $args[0]; |
| 87 | - $sheet = new Sheet(file_get_contents($this->baseDir . $fileName), dirname(realpath($this->baseDir . $fileName)) . DIRECTORY_SEPARATOR, $this->xPath, $this->valueParser); |
|
| 87 | + $sheet = new Sheet(file_get_contents($this->baseDir.$fileName), dirname(realpath($this->baseDir.$fileName)).DIRECTORY_SEPARATOR, $this->xPath, $this->valueParser); |
|
| 88 | 88 | return $sheet->parse($indexStart); |
| 89 | 89 | } |
| 90 | 90 | |