Ver Mensaje Individual
  #7 (permalink)  
Antiguo 26/01/2010, 09:37
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: request y isPost en ZF

Lo hace en el request default, lo puedes ver en el archivo Zend/Controller/Request/Http.php y tal cual la implementación es algo similar:
Código PHP:
Ver original
  1. /**
  2.      * Return the method by which the request was made
  3.      *
  4.      * @return string
  5.      */
  6.     public function getMethod()
  7.     {
  8.         return $this->getServer('REQUEST_METHOD');
  9.     }
  10.  
  11.     /**
  12.      * Was the request made by POST?
  13.      *
  14.      * @return boolean
  15.      */
  16.     public function isPost()
  17.     {
  18.         if ('POST' == $this->getMethod()) {
  19.             return true;
  20.         }
  21.  
  22.         return false;
  23.     }

Saludos.