Yaf_Request_Abstract::isPost
(Yaf >=1.0.0)
Yaf_Request_Abstract::isPost — Determine if the request is a POST request
Description
public function Yaf_Request_Abstract::isPost():
bool
Checks whether the request was sent with the POST method.
Parameters
This function has no parameters.
Return Values
Returns true if the request method is POST, false otherwise.
Examples
Example #1 Yaf_Request_Abstract::isPost() example
<?php
class LoginController extends Yaf_Controller_Abstract
{
public function indexAction()
{
// Assuming the form was submitted with POST /login
var_dump($this->getRequest()->isPost());
}
}
?>
The above example will output
something similar to: