mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
Fix potential resolve() helper function conflict (#218)
This commit is contained in:
committed by
Taylor Otwell
parent
e965fac863
commit
bb19f85748
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Container\Container;
|
||||||
|
|
||||||
class Facade
|
class Facade
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -21,7 +23,9 @@ public static function containerKey()
|
|||||||
*/
|
*/
|
||||||
public static function __callStatic($method, $parameters)
|
public static function __callStatic($method, $parameters)
|
||||||
{
|
{
|
||||||
return call_user_func_array([resolve(static::containerKey()), $method], $parameters);
|
$resolvedInstance = Container::getInstance()->make(static::containerKey());
|
||||||
|
|
||||||
|
return call_user_func_array([$resolvedInstance, $method], $parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,15 +46,17 @@ function output($output)
|
|||||||
(new Symfony\Component\Console\Output\ConsoleOutput)->writeln($output);
|
(new Symfony\Component\Console\Output\ConsoleOutput)->writeln($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
if (! function_exists('resolve')) {
|
||||||
* Resolve the given class from the container.
|
/**
|
||||||
*
|
* Resolve the given class from the container.
|
||||||
* @param string $class
|
*
|
||||||
* @return mixed
|
* @param string $class
|
||||||
*/
|
* @return mixed
|
||||||
function resolve($class)
|
*/
|
||||||
{
|
function resolve($class)
|
||||||
return Container::getInstance()->make($class);
|
{
|
||||||
|
return Container::getInstance()->make($class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user