php8.5
Home/ Manual/ yaf / yaf_application/ Yaf_Application::run

Yaf_Application::run

PHP function Edit on GitHub ✎

(Yaf >=1.0.0)

Start Yaf_Application

Description

Yaf_Application::run(): Yaf_Response_Abstract|false

Run a Yaf_Application, let the Yaf_Application accept a request, route this request, dispatch to controller/action and render a response. Finally, return the response to the client.

Parameters Parameters

Return Values

Returns the Yaf_Response_Abstract object on success, or false on failure (for instance if the application is already running).

Errors/Exceptions

Triggers a YAF_ERR_STARTUP_FAILED error if the application was already started.

Examples

Yaf_Application::run() example

php
<?php
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', __DIR__);

$application = new Yaf_Application(APPLICATION_PATH.'/conf/application.ini');
$application->bootstrap()->run();
?>

See Also

  • Yaf_Application::bootstrap
  • Yaf_Dispatcher::dispatch

Source: reference/yaf/yaf_application/run.xml · from the official PHP manual (php/doc-en)