PHPMyFramework is a simple PHP request/response framework
You'll need Docker
git clone https://github.com/jose-deblas/phpmyframework.git
cd phpmyframework
make installUse the config/routes.yaml to set up the Routes
app_post_category:
path: /post/{id}/category/{category}
controller: App\UI\Controller\PostController
method: executeUse the config/providers.php file to set up the array with all the Providers classes that you need registered in the container
return [
'\App\Providers\ControllerProvider',
'\App\Providers\RepositoriesProvider'
];Each provider has to implement the interface \Framework\Container\ServiceProviderInterface where the function register is mandatory
class RepositoriesProvider implements ServiceProviderInterface
{
public function register(ContainerInterface $container): void
{
$container->bind(
'App\Infrastructure\Persistence\PostRepository',
fn() => new \App\Infrastructure\Persistence\PostRepository()
);
}
}