Changeset 8255
- Timestamp:
- 04/04/08 10:33:03 (3 months ago)
- Files:
-
- doc/branches/1.1/book/06-Inside-the-Controller-Layer.txt (modified) (1 diff)
- doc/branches/1.1/book/09-Links-and-the-Routing-System.txt (modified) (1 diff)
- doc/branches/1.1/book/10-Forms.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/branches/1.1/book/06-Inside-the-Controller-Layer.txt
r7705 r8255 441 441 -------------------------------- | -------------------------------------- | ----------------------------------------------------------------------- 442 442 **Request Information** | | 443 `isMethod($method)` | Is it a post or a get? | true or false 443 444 `getMethod()` | Request method | Returns `sfRequest::GET` or `sfRequest::POST` constants 444 445 `getMethodName()` | Request method name | `'POST'` doc/branches/1.1/book/09-Links-and-the-Routing-System.txt
r8042 r8255 310 310 311 311 [php] 312 $this->forward404 If($request->getMethod() != sfRequest::POST);312 $this->forward404Unless($this->getRequest()->isMethod('post')); 313 313 314 314 Just 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 169 169 > public function executeEditAuthor() 170 170 > { 171 > if ( $this->getRequest()->getMethod() != sfRequest::POST)171 > if (!$this->getRequest()->isMethod('post')) 172 172 > { 173 173 > // Display the form … … 619 619 public function executeSend() 620 620 { 621 if ( $this->getRequest()->getMethod() != sfRequest::POST)621 if (!$this->getRequest()->isMethod('post')) 622 622 { 623 623 // Prepare data for the template