v.0.1
This commit is contained in:
21
vendor/craft-group/phroute/src/Phroute/HandlerResolver.php
vendored
Normal file
21
vendor/craft-group/phroute/src/Phroute/HandlerResolver.php
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?php namespace Phroute\Phroute;
|
||||
|
||||
class HandlerResolver implements HandlerResolverInterface {
|
||||
|
||||
/**
|
||||
* Create an instance of the given handler.
|
||||
*
|
||||
* @param $handler
|
||||
* @return array
|
||||
*/
|
||||
|
||||
public function resolve ($handler)
|
||||
{
|
||||
if(is_array($handler) && is_string($handler[0]))
|
||||
{
|
||||
$handler[0] = new $handler[0];
|
||||
}
|
||||
|
||||
return $handler;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user