Yaf_Application::execute
(Yaf >=1.0.0)
Yaf_Application::execute — 运行回调函数
说明
这个方法通常用于在cron任务中运行Yaf_Application。 在cron任务中也可以使用autoloader和Bootstrap机制。
参数
-
entry
-
一个有效的回调函数
-
...
-
零个或者多个要传递给函数的参数。
返回值
范例
示例 #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);
?>
以上例程的输出类似于:

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/yaf-application.execute.php