PHP 8.3.4 Released!

Yaf_Application::execute

(Yaf >=1.0.0)

Yaf_Application::executeExecute a callback

Beschreibung

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

This method is typically used to run Yaf_Application in a crontab work. Make the crontab work can also use the autoloader and Bootstrap mechanism.

Parameter-Liste

entry

a valid callback

args

parameters will pass to the callback

Rückgabewerte

Beispiele

Beispiel #1 Yaf_Application::execute()example

<?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);
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:


add a note

User Contributed Notes

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