示例#1
0
/**
 * @return Application
 */
function app() : Application
{
    static $app;
    if ($app === null) {
        $app = Application::getInstance();
    }
    return $app;
}
示例#2
0
 public function __construct()
 {
     $this->instances[Application::class] = Application::getInstance();
 }