checks if given path is satisfied by request path

@param   string  $expectedPath
@return  bool
421696
public function satisfiesPath(string $expectedPath = null): bool
    {
        if (empty($expectedPath)) {
            return true;
        }

        if (preg_match('/^' . UriPath::pattern($expectedPath) . '/', $this->uri->path()) >= 1) {
            return true;
        }

        return false;
    }
1095559
private function requestMethodMatchesExpectation(ServerRequestInterface $httpRequest, Request $expectedRequest)
    {
        $inputSource = $this->inputSourceFactory->createFromConfig([
            'method' => null,
        ]);
        $matcher = $this->matcherFactory->createFromConfig([
            Matchers::SAME_STRING => $expectedRequest->getMethod(),
        ]);

        return $this->evaluate($inputSource, $matcher, $httpRequest);
    }
793260
public function isValidPath($path)
    {
        $isValidPath = false;

        $pathValue = $this->getValueByPath($path);
        if (!is_null($pathValue)) {
            $isValidPath = true;
        }

        return $isValidPath;
    }
212396
private function isAllowedPath($path) {
    $unallowed_paths = [
      '/user/logout',
      '/ajax',
    ];
    foreach ($unallowed_paths as $unallowed_path) {
      if ($unallowed_path === substr($path, 0, strlen($unallowed_path))) {
        return FALSE;
      }
    }
    return TRUE;
  }
951188
public function fileExists($path) {

        $ch = curl_init($this->hostUrl . "/" . $this->siteFolder . $path);

        curl_setopt($ch, CURLOPT_NOBODY, true);

        $result = curl_exec($ch);
        $ret = false;

        if($result !== false) {
        $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        if($status == 200) {
            $ret = true;
        }
        }

        curl_close($ch);

        return $ret;
    }
194781
public static function match($actual, $expected)
    {
        $args = func_get_args();
        $expected = count($args) > 2 ? array_slice($args, 1) : $expected;
        $expected = (array) $expected;

        if (is_array($actual)) {
            foreach ($expected as $key) {
                if (!array_key_exists($key, $actual)) {
                    return false;
                }
            }
            return true;
        } elseif ($actual instanceof ArrayAccess) {
            foreach ($expected as $key) {
                if (!isset($actual[$key])) {
                    return false;
                }
            }
            return true;
        } elseif ($actual instanceof Traversable) {
            foreach ($expected as $key) {
                foreach ($actual as $k => $v) {
                    if ($key === $k) {
                        continue 2;
                    }
                }
                return false;
            }
            return true;
        }

        return false;
    }
886433
public function has(string ...$path): bool
    {
        try {
            $this->get(...$path);
        } catch (ConfigKeyNotFoundException $e) {
            return false;
        }

        return true;
    }
1161298
protected function checkPath($path)
    {
        if (is_dir($path)) {
            return true;
        }
        if (mkdir($path, 0755, true)) {
            return true;
        } else {
            return false;
        }
    }
155122
public function checkPath($path = null)
  {
    if($path === null)
    {
      $path = $this->path;
    }

    if(strlen($path) == 0)
    {
      return TRUE;
    }

    $pattern = "/^" . $this->regex["path"] . "$/";
    $status = @preg_match($pattern, $path);

    if($status === FALSE)
    {
      throw new Exception("URI path validation failed");
    }

    return ($status == 1);
  }
1254502
public function has($path) {
			try {
				return $this->bucket->fileExists($path);
			} catch (\Exception $e) {
				throw new B2FlysystemException('Error checking for file', B2FlysystemException::B2_SDK_ERROR, $e);
			}
		}
910849
public function equals(ServerRequestInterface $httpRequest, MockConfig $expectation)
    {
        $this->logger->debug('Checking if request matches an expectation');

        if (!$this->isExpectedScenarioState($expectation)) {
            return false;
        }

        $expectedRequest = $expectation->getRequest();

        $atLeastOneExecution = $this->compareRequestParts($httpRequest, $expectedRequest);

        if (null !== $atLeastOneExecution && $expectedRequest->getHeaders()) {
            $this->logger->debug('Checking headers against expectation');

            return $this->requestHeadersMatchExpectation($httpRequest, $expectedRequest);
        }

        return (bool) $atLeastOneExecution;
    }
554635
public function fileExists($path)
    {
        $filePath = $this->getFullPath($path);

        return file_exists($filePath) ? true : false;
    }
1371429
@Override
	protected boolean isValidRequestedPath(String requestedPath) {

		boolean result = true;
		if (requestedPath.startsWith(JawrConstant.WEB_INF_DIR_PREFIX)
				|| requestedPath.startsWith(JawrConstant.META_INF_DIR_PREFIX)) {
			result = false;
		}

		return result;
	}
723783
public function matchRequestPath($requestPath)
    {
        foreach ([$requestPath, urlencode($requestPath), urldecode($requestPath)] as $path) {
            foreach ([$this->catch_path, urlencode($this->catch_path), urldecode($this->catch_path)] as $catch) {
                if ($this->pathMatcher($path, $catch)) {
                    return true;
                }
            }
        }

        return false;
    }
338294
public function pathExists(string $path): bool
	{
		try
		{
			$this->getRenderer()->getLoader()->load($path);

			return true;
		}
		catch (\Mustache_Exception_UnknownTemplateException $e)
		{
			return false;
		}
	}
1353103
public function is($path)
    {
        list($package, $route) = $this->locate($path);

        return $this->route($package)->is($route);
    }
110872
public static function match($actual, $expected)
    {
        if (is_string($actual)) {
            return strpos($actual, $expected) !== false;
        } elseif (is_array($actual) || $actual instanceof Traversable) {
            foreach ($actual as $key => $value) {
                if ($value === $expected) {
                    return true;
                }
            }
        }
        return false;
    }