Example #1
0
 public function isIgnorablePath()
 {
     if ($this->configuration->getIgnorablePaths() == null || !isset($_SERVER['REQUEST_URI'])) {
         return false;
     }
     $ignorablePaths = array_map(function ($path) {
         return '(' . str_replace('/', '\\/', $path) . ')';
     }, $this->configuration->getIgnorablePaths());
     $pattern = '/(' . implode('|', $ignorablePaths) . ')+/i';
     $path = $_SERVER['REQUEST_URI'];
     return (bool) preg_match($pattern, $path);
 }