first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$operators = ['not', '!', 'or', '||', '&&', 'and', '|', '^', '&', '==', '===', '!=', '!==', '<', '>', '>=', '<=', 'not in', 'in', '..', '+', '-', '~', '*', '/', '%', 'matches', '**'];
|
||||
$operators = array_combine($operators, array_map('strlen', $operators));
|
||||
arsort($operators);
|
||||
|
||||
$regex = [];
|
||||
foreach ($operators as $operator => $length) {
|
||||
// Collisions of character operators:
|
||||
// - an operator that begins with a character must have a space or a parenthesis before or starting at the beginning of a string
|
||||
// - an operator that ends with a character must be followed by a whitespace or a parenthesis
|
||||
$regex[] =
|
||||
(ctype_alpha($operator[0]) ? '(?<=^|[\s(])' : '')
|
||||
.preg_quote($operator, '/')
|
||||
.(ctype_alpha($operator[$length - 1]) ? '(?=[\s(])' : '');
|
||||
}
|
||||
|
||||
echo '/'.implode('|', $regex).'/A';
|
||||
11
modules/inpostshipping/vendor/symfony/expression-language/Resources/bin/index.php
vendored
Normal file
11
modules/inpostshipping/vendor/symfony/expression-language/Resources/bin/index.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
11
modules/inpostshipping/vendor/symfony/expression-language/Resources/index.php
vendored
Normal file
11
modules/inpostshipping/vendor/symfony/expression-language/Resources/index.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Reference in New Issue
Block a user