corporate » labs » forge
E29 Incorporated

E29 Product Documentation


Serenity::output()

The output class controls sending content to the browser.

Serenity::output()->do_immediate_redirect()

void Serenity::output()->do_immediate_redirect( $where );

Since 2008.Summer.3

This function will halt the execution of code and immediately create a META redirect to the URL provided in $where

Example

if( $bad )
{
     Serenity::output()->do_immediate_redirect( Serenity::get("base_url") );
}

Serenity::output()->load_widget_template()

string Serenity::output()->load_widget_template( $widget, $tpl );

Since 2008.Summer.3

This function returns a Widget template ( as opposed to calling load_template() ). The template is also set in the self::$bits container, just like calling load_template()

Example

//
// Load the template for SSO
Serenity::output()->load_widget_template( 'sso', 'login' );
 
developers/serenityap/api/serenity-output.html.txt · Last modified: 2008/08/25 09:38 by akinder