pass function with argument to method call
<p>I'm trying to use flight PHP framework for routing and medoo framework for database usage. </p>

<pre><code>//connect database
$database = new medoo([
'database_type' =&gt; 'sqlite',
'database_file' =&gt; 'db.sqlite'
]);
//my function
function database($database){
$database-&gt;insert("ppl", [
"fn" =&gt; "joe","ln"=&gt;"doe"]);

}
//
Flight::route('/add/', array(database($database)));
</code></pre>

<p>How to invoke my function with argument from this place:</p>

<pre><code>Flight::route('/add/','database')
</code></pre>

<p>Tried different variants but getting errors.</p>