1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-16 07:06:07 +02:00
Files
php-typemill/system/Plugin.php
2017-11-17 17:44:02 +01:00

44 lines
730 B
PHP

<?php
namespace Typemill;
use \Symfony\Component\EventDispatcher\EventSubscriberInterface;
abstract class Plugin implements EventSubscriberInterface
{
protected $app;
protected $container;
/**
* Constructor.
*
* @param string $name
* @param Grav $grav
* @param Config $config
*/
public function __construct($container, $app)
{
$this->container = $container;
$this->app = $app;
}
protected function getRoute()
{
return $this->container['request']->getUri();
}
protected function getPath()
{
$route = $this->container['request']->getUri();
return $route->getPath();
}
protected function getDispatcher($dispatcher)
{
return $dispatcher;
}
}