downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Yaf_Dispatcher::catchException> <Yaf_Dispatcher
[edit] Last updated: Fri, 30 Nov 2012

view this page in

Yaf_Dispatcher::autoRender

(PECL yaf >=1.0.0)

Yaf_Dispatcher::autoRenderSwitch on/off autorendering

Opis

public Yaf_Dispatcher Yaf_Dispatcher::autoRender ([ bool $flag ] )

Yaf_Dispatcher will render automatically after dispatches a incoming request, you can prevent the rendering by calling this method with flag TRUE

Informacja:

you can simply return FALSE in a action to prevent the auto-rendering of that action

Parametry

flag

bool

Informacja:

since 2.2.0, if this parameter is not given, then the current state will be renturned

Zwracane wartości

Przykłady

Przykład #1 Yaf_Dispatcher::autoRender()example

<?php
class IndexController extends Yaf_Controller_Abstract {
     
/* init method will be called as soon as a controller is initialized */ 
     
public function init() {
         if (
$this->getRequest()->isXmlHttpRequest()) {
             
//do not call render for ajax request
             //we will outpu a json string
             
Yaf_Dispatcher::getInstance()->autoRender(FALSE);
         }
     } 

}
?>

Powyższy przykład wyświetli coś podobnego do:



add a note add a note User Contributed Notes Yaf_Dispatcher::autoRender - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites