public static function ServerRequestFactory::stripQueryString in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-diactoros/src/ServerRequestFactory.php \Zend\Diactoros\ServerRequestFactory::stripQueryString()
Strip the query string from a path
Parameters
mixed $path:
Return value
string
1 call to ServerRequestFactory::stripQueryString()
- ServerRequestFactory::marshalUriFromServer in vendor/
zendframework/ zend-diactoros/ src/ ServerRequestFactory.php - Marshal the URI from the $_SERVER array and headers
File
- vendor/
zendframework/ zend-diactoros/ src/ ServerRequestFactory.php, line 362
Class
- ServerRequestFactory
- Class for marshaling a request object from the current PHP environment.
Namespace
Zend\DiactorosCode
public static function stripQueryString($path) {
if (($qpos = strpos($path, '?')) !== false) {
return substr($path, 0, $qpos);
}
return $path;
}