/** * Set up the application and shut it down afterwards * * @param callable $execute * @return void */ public function run(callable $execute = NULL) { $this->bootstrap->run(); if ($execute !== NULL) { if ($execute instanceof \Closure) { $execute->bindTo($this); } call_user_func($execute); } $this->bootstrap->shutdown(); }