mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Added Request::isPostBack helper method
This commit is contained in:
@@ -363,6 +363,16 @@ class Request
|
||||
return (strtolower($this->getHeader('http-x-requested-with')) === 'xmlhttprequest');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true when request-type is post.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPostBack(): bool
|
||||
{
|
||||
return ($this->getMethod() === static::REQUEST_TYPE_POST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get accept formats
|
||||
* @return array
|
||||
|
||||
Reference in New Issue
Block a user