mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-06-08 18:57:12 +00:00
remove mkdocs specific syntax
This commit is contained in:
parent
8d08c1964f
commit
8026e1465b
77 changed files with 1128 additions and 1128 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Routing (Example)
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
// config/route.php
|
||||
return [
|
||||
[ 'GET', '/api/user[/{id}]', Controller\User::class ],
|
||||
|
@ -14,7 +14,7 @@ return [
|
|||
|
||||
## Controller (Example)
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
public class UserController implements ControllerInterface
|
||||
{
|
||||
public function __construct(UserModel $user)
|
||||
|
|
|
@ -10,13 +10,13 @@ This framework is mainly used as tutorial for introducing the Model-View-Control
|
|||
|
||||
## Installation
|
||||
|
||||
```ps1 linenums="1"
|
||||
```ps1
|
||||
composer create-project ezimuel/simple-mvc
|
||||
```
|
||||
|
||||
## Structure
|
||||
|
||||
```txt linenums="1"
|
||||
```txt
|
||||
|- config
|
||||
| |- container.php --> DI Container Config (PHP-DI)
|
||||
| |- route.php --> routing
|
||||
|
@ -34,7 +34,7 @@ composer create-project ezimuel/simple-mvc
|
|||
|
||||
### `index.php`
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
@ -98,7 +98,7 @@ $controller->execute($request);
|
|||
|
||||
### `route.php`
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
<?php
|
||||
use SimpleMVC\Controller;
|
||||
|
||||
|
@ -111,7 +111,7 @@ return [
|
|||
|
||||
### `container.php`
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
<?php
|
||||
use League\Plates\Engine;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
@ -130,7 +130,7 @@ return [
|
|||
|
||||
Each controller *must* implement this interface.
|
||||
|
||||
```php linenums="1"
|
||||
```php
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue