GoLang Yaf_Application::execute

request it (322)
GoLang replacement for PHP's Yaf_Application::execute [edit | history]



Do you know a GoLang replacement for PHP's Yaf_Application::execute? Write it!

PHP Yaf_Application::execute

PHP original manual for Yaf_Application::execute [ show | php.net ]

Yaf_Application::execute

(Yaf >=1.0.0)

Yaf_Application::executeExecute a callback

Description

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

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.

Parameters

entry

a valid callback

...

parameters will pass to the callback

Return Values

Examples

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

The above example will output something similar to: