PHP 8.6.0 Beta 3 is available for testing

Yaf_Application::run

(Yaf >=1.0.0)

Yaf_Application::runDémarre Yaf_Application

Description

public function Yaf_Application::run(): Yaf_Response_Abstract|false

Exécute une Yaf_Application, permet à la Yaf_Application d'accepter une requête, de router cette requête, de la distribuer au contrôleur/à l'action et de générer une réponse. Enfin, retourne la réponse au client.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne l'objet Yaf_Response_Abstract en cas de succès, ou false en cas d'échec (par exemple si l'application est déjà en cours d'exécution).

Erreurs / Exceptions

Déclenche une erreur YAF_ERR_STARTUP_FAILED si l'application a déjà été démarrée.

Exemples

Exemple #1 Exemple avec Yaf_Application::run()

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

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

Voir aussi

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top