Files

15 lines
280 B
PHP
Raw Permalink Normal View History

2016-09-05 18:19:12 -04:00
<?php
namespace Routing;
class HandlerResolver implements HandlerResolverInterface
{
2018-05-21 11:49:15 -04:00
public function resolve($handler)
2016-09-05 18:19:12 -04:00
{
2018-05-21 11:49:15 -04:00
if (is_array($handler) && is_string($handler[0])) {
2021-05-14 20:10:54 +08:00
$handler[0] = new $handler[0]();
2018-05-21 11:49:15 -04:00
}
2016-09-05 18:19:12 -04:00
2018-05-21 11:49:15 -04:00
return $handler;
}
}