- function __construct(RouterInterface $router, string $cache = '../var/cache', string $path = './bundles/rapsyspack', string $prefix = 'facebook', ?string $source = null, array $fonts = [ 'default' => 'ttf/default.ttf' ], string $font = 'default', int $size = 60, int $width = 15, string $fill = 'white', string $stroke = '#00c3f9', string $align = 'center') {
- //Set align
- $this->align = $align;
-
- //Set cache
- $this->cache = $cache.'/'.$prefix;
-
- //Set fill
- $this->fill = $fill;
-
- //Set font
- $this->font = $font;
-
- //Set fonts
- $this->fonts = $fonts;
-
- //Set path
- $this->path = $path.'/'.$prefix;
-
- //Set prefix key
- $this->prefix = $prefix;
-
- //Set router
- $this->router = $router;
-
- //Set size
- $this->size = $size;
-
- //Set source
- $this->source = $source;
-
- //Set stroke
- $this->stroke = $stroke;
-
- //Set width
- $this->width = $width;
+ public function __construct(protected ContainerInterface $container, protected RouterInterface $router, protected SluggerUtil $slugger) {
+ //Retrieve config
+ $this->config = $container->getParameter($this->alias = RapsysPackBundle::getAlias());