Beispiel #1
0
 /**
  * {@inheritdoc}
  *
  * TODO: Using "all" here is not a good idea. This means that nobody can create a structureType called "all"
  */
 public function addExtension(ExtensionInterface $extension, $structureType = 'all')
 {
     if (!isset($this->extensions[$structureType])) {
         $this->extensions[$structureType] = [];
     }
     $this->extensions[$structureType][$extension->getName()] = $extension;
 }
Beispiel #2
0
 /**
  * Extend Gasp with the supplied extension.
  *
  * @param ExtensionInterface $extension
  * @return $this
  */
 public function extend(ExtensionInterface $extension)
 {
     $extension->extend($this);
     return $this;
 }
 public function add(ExtensionInterface $extension)
 {
     $this->extensions[$extension->getKey()] = $extension;
 }