Update command factory. Update command collection
This commit is contained in:
parent
0be2f14e95
commit
dbe88b7f2b
7 changed files with 225 additions and 45 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
use Runtime\Bootstrap;
|
||||
use Runtime\Contracts\Container\Container;
|
||||
use Runtime\Factory\BootstrapFactory;
|
||||
use Runtime\Http\Input\InputHandler;
|
||||
use Runtime\Http\Request;
|
||||
use Runtime\Http\Response;
|
||||
|
@ -14,7 +15,7 @@ if(!function_exists('app'))
|
|||
/**
|
||||
* @param null $abstract
|
||||
* @param array $arguments
|
||||
* @return \Runtime\Factory\BootstrapFactory|Container
|
||||
* @return BootstrapFactory|Container|mixed
|
||||
*/
|
||||
function app($abstract = null, $arguments = [])
|
||||
{
|
||||
|
@ -54,6 +55,24 @@ if(!function_exists('dump'))
|
|||
}
|
||||
}
|
||||
|
||||
if(!function_exists('endsWith'))
|
||||
{
|
||||
/**
|
||||
* @param $haystack
|
||||
* @param $needle
|
||||
* @return bool
|
||||
*/
|
||||
function endsWith($haystack, $needle)
|
||||
{
|
||||
$length = strlen($needle);
|
||||
if ($length == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (substr($haystack, -$length) === $needle);
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('input'))
|
||||
{
|
||||
/**
|
||||
|
@ -124,6 +143,20 @@ if(!function_exists('route'))
|
|||
}
|
||||
}
|
||||
|
||||
if(!function_exists('startsWith'))
|
||||
{
|
||||
/**
|
||||
* @param $haystack
|
||||
* @param $needle
|
||||
* @return bool
|
||||
*/
|
||||
function startsWith($haystack, $needle)
|
||||
{
|
||||
$length = strlen($needle);
|
||||
return (substr($haystack, 0, $length) === $needle);
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('view'))
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue