-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
# MagisBundle | ||
|
||
*Symfony bundle for php templates rendering* | ||
|
||
## Why Magis? | ||
### - It's incredible fast! | ||
### - It's easy to understand! | ||
### - It can implement all services you need! | ||
|
||
|
||
## Install | ||
|
||
If you want to install Magis symfony bundle | ||
``` | ||
composer require pjpawel/magis-bundle | ||
``` | ||
If you want raw view service and view classes use [Magis](https://github.com/pjpawel/Magis) | ||
``` | ||
composer require pjpawel/magis | ||
``` | ||
|
||
## Usage | ||
|
||
In container, you will find `magis` alias for `ViewDispatcherService`; | ||
You should use 'AbstractMagisController': | ||
```php | ||
use pjpawel\Magis\MagisBundle\Controller\AbstractMagisController; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class FooController extends AbstractMagisController | ||
{ | ||
|
||
public function test(): Response | ||
{ | ||
return $this->renderPhpView($templateName, $params); | ||
} | ||
|
||
} | ||
``` |