Update Framework

This commit is contained in:
Maarten 2019-12-23 18:55:25 +01:00
parent 06f17dff5b
commit 69f3313f0f
19 changed files with 974 additions and 35 deletions

View file

@ -0,0 +1,35 @@
<?php
use Runtime\Bootstrap;
use Runtime\Http\Views\Factory as ViewFactory;
if(!function_exists('app'))
{
/**
* @param null $abstract
* @return mixed|Container
*/
function app($abstract = null)
{
if (is_null($abstract)) {
Bootstrap::getInstance();
}
return Bootstrap::getInstance()->make($abstract);
}
}
if(!function_exists('view'))
{
/**
* @param $name
* @param array $arguments
* @return mixed
*/
function view($name, $arguments = [])
{
$factory = app(ViewFactory::class);
return $factory->make($name, $arguments);
}
}