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

search for in the

Yaf_Dispatcher::getInstance> <Yaf_Dispatcher::flushInstantly
[edit] Last updated: Fri, 17 May 2013

view this page in

Yaf_Dispatcher::getApplication

(Yaf >=1.0.0)

Yaf_Dispatcher::getApplicationRecupera la aplicación

Descripción

public Yaf_Application Yaf_Dispatcher::getApplication ( void )

Recupera la instancia de la clase Yaf_Application. Hace lo mismo que el método Yaf_Application::app().

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Ver también



add a note add a note User Contributed Notes Yaf_Dispatcher::getApplication - [1 notes]
up
-1
brandon at brandonlamb dot com
1 year ago
Here is an example of how you can get the instance of Yaf_Application from somewhere in your application.

index.php:
<?php
// Set BASE_PATH to one directory up, outside of document root
define('BASE_PATH', realpath(dirname(__FILE__) . '/..'));

// Instantiate new application
$app  = new Yaf_Application(BASE_PATH . '/application/config/application.ini');
$app->bootstrap()->run();
?>

Blog.php (controller):
<?php
$app
= Yaf_Application::app();
print_r($app);
?>

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