mirror of
https://github.com/typemill/typemill.git
synced 2025-10-16 07:06:07 +02:00
44 lines
730 B
PHP
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;
|
|
}
|
|
|
|
}
|