Development

Changeset 8255

You must first sign up to be able to contribute.

Changeset 8255

Show
Ignore:
Timestamp:
04/04/08 10:33:03 (3 months ago)
Author:
francois
Message:

[doc 1.1] documented sfWebRequest->isMethod($method)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • doc/branches/1.1/book/06-Inside-the-Controller-Layer.txt

    r7705 r8255  
    441441-------------------------------- | -------------------------------------- | ----------------------------------------------------------------------- 
    442442**Request Information**          |                                        | 
     443`isMethod($method)`              | Is it a post or a get?                 | true or false 
    443444`getMethod()`                    | Request method                         | Returns `sfRequest::GET` or `sfRequest::POST` constants 
    444445`getMethodName()`                | Request method name                    | `'POST'` 
  • doc/branches/1.1/book/09-Links-and-the-Routing-System.txt

    r8042 r8255  
    310310 
    311311    [php] 
    312     $this->forward404If($request->getMethod() != sfRequest::POST); 
     312    $this->forward404Unless($this->getRequest()->isMethod('post')); 
    313313 
    314314Just make sure you don't use this option on links located in forms, since it generates its own `<form>` tag. 
  • doc/branches/1.1/book/10-Forms.txt

    r8151 r8255  
    169169>     public function executeEditAuthor() 
    170170>     { 
    171 >       if ($this->getRequest()->getMethod() != sfRequest::POST
     171>       if (!$this->getRequest()->isMethod('post')
    172172>       { 
    173173>         // Display the form 
     
    619619      public function executeSend() 
    620620      { 
    621         if ($this->getRequest()->getMethod() != sfRequest::POST
     621        if (!$this->getRequest()->isMethod('post')
    622622        { 
    623623          // Prepare data for the template