Compare commits
7 Commits
0cc766c662
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d1c9f8048 | |||
| ba1f4ccfc0 | |||
| 33665b1d4a | |||
| 524ef03dcf | |||
| 9221afd796 | |||
| 8f07413b85 | |||
| cbac9fa700 |
@@ -0,0 +1,3 @@
|
||||
composer.lock
|
||||
/nbproject/
|
||||
/vendor/
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "potter/template",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Potter\\Template\\": "src/Potter/Template/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jay Potter",
|
||||
"email": "j@ypotter.ca"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
"require": {
|
||||
"league/plates": "^3.6.0",
|
||||
"potter/container": ">=0.0.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Template;
|
||||
|
||||
use \Potter\Container;
|
||||
|
||||
trait Behaviour
|
||||
{
|
||||
private static function addTemplateBehaviour(Container $container): void
|
||||
{
|
||||
self::addTemplateEngine($container);
|
||||
}
|
||||
|
||||
private static function addTemplateEngine(Container $container): void
|
||||
{
|
||||
$container->addShared(Template::class);
|
||||
}
|
||||
|
||||
private static function getTemplateEngine(Container $container): Template
|
||||
{
|
||||
return $container->get(Template::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Potter\Template;
|
||||
|
||||
final class Template extends \League\Plates\Engine
|
||||
{ }
|
||||
Reference in New Issue
Block a user