mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-15 18:23:26 +03:00
26 lines
670 B
PHP
26 lines
670 B
PHP
<?php
|
|
|
|
class CustomClassLoader implements \Pecee\SimpleRouter\ClassLoader\IClassLoader
|
|
{
|
|
public function loadClass(string $class)
|
|
{
|
|
return new DummyController();
|
|
}
|
|
|
|
/**
|
|
* Called when loading class method
|
|
* @param object $class
|
|
* @param string $method
|
|
* @param array $parameters
|
|
* @return object
|
|
*/
|
|
public function loadClassMethod($class, string $method, array $parameters)
|
|
{
|
|
return call_user_func_array([$class, $method], ['result' => true]);
|
|
}
|
|
|
|
public function loadClosure(callable $closure, array $parameters)
|
|
{
|
|
return call_user_func_array($closure, ['result' => true]);
|
|
}
|
|
} |