CakeFest 2024: The Official CakePHP Conference

Yaf_Application::execute

(Yaf >=1.0.0)

Yaf_Application::executeExécute une fonction de rappel

Description

public Yaf_Application::execute(callable $entry, string ...$args): void

Cette méthode est habituellement utilisée pour exécuter Yaf_Application dans un crontab. Le crontab peut aussi utiliser le mécanisme d'autoloader et de Bootstrap.

Liste de paramètres

entry

Une fonction de rappel valide.

args

Paramètres à passer à la fonction de rappel

Valeurs de retour

Exemples

Exemple #1 Exemple avec Yaf_Application::execute()

<?php
function main($argc, $argv) {
}

$config = array(
"application" => array(
"directory" => realpath(dirname(__FILE__)) . "/application",
),
);

/** Yaf_Application */
$application = new Yaf_Application($config);
$application->execute("main", $argc, $argv);
?>

Résultat de l'exemple ci-dessus est similaire à :


add a note

User Contributed Notes

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