framework/src/Extend/Formatter.php
Franz Liedke 7b45ca3a78 Typehint container contract instead of application class.
This helps us in decoupling from Laravel, as we only need any
implementation of the container contract now.
2015-06-03 03:05:10 +02:00

25 lines
527 B
PHP

<?php namespace Flarum\Extend;
use Illuminate\Contracts\Container\Container;
class Formatter implements ExtenderInterface
{
protected $name;
protected $class;
protected $priority;
public function __construct($name, $class, $priority = 0)
{
$this->name = $name;
$this->class = $class;
$this->priority = $priority;
}
public function extend(Container $container)
{
$container->make('flarum.formatter')->add($this->name, $this->class, $this->priority);
}
}