mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 08:47:52 +00:00
[!!!][FEATURE] Removed php-di as suggested by #477
NOTE: Custom class-loader should be used to create custom integrations with frameworks like php-di. See documentation for more information. - Removed all references to php-cli from composer + code. - Added ClassLoader php-unit tests.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
class CustomClassLoader implements \Pecee\SimpleRouter\ClassLoader\IClassLoader
|
||||
{
|
||||
public function loadClass(string $class)
|
||||
{
|
||||
return new DummyController();
|
||||
}
|
||||
|
||||
public function loadClosure(callable $closure, array $parameters)
|
||||
{
|
||||
return \call_user_func_array($closure, ['result' => true]);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,11 @@ class DummyController
|
||||
public function method2()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function method3()
|
||||
{
|
||||
return 'method3';
|
||||
}
|
||||
|
||||
public function param($params = null)
|
||||
|
||||
Reference in New Issue
Block a user