vendor/codeages/plugin-bundle/System/Slot/SlotManager.php line 31

Open in your IDE?
  1. <?php
  2. namespace Codeages\PluginBundle\System\Slot;
  3. class SlotManager
  4. {
  5.     protected $dispatcher;
  6.     protected $collector;
  7.     public function __construct($collector$container)
  8.     {
  9.         $this->collector $collector;
  10.         $this->container $container;
  11.     }
  12.     public function fire($name$args)
  13.     {
  14.         $injections $this->collector->getInjections($name);
  15.         if (empty($injections)) {
  16.             return '';
  17.         }
  18.         $contents = array();
  19.         foreach ($injections as $name => $class) {
  20.             $injection = new $class();
  21.             $injection->setContainer($this->container);
  22.             $injection->setArgements($args);
  23.             $contents[] = $injection->inject();
  24.         }
  25.         return implode(''$contents);
  26.     }
  27. }