Beispiel #1
0
 /**
  * Returns the addon by the given name.
  *
  * @param string $addon Name of the addon
  *
  * @throws InvalidArgumentException
  *
  * @return self
  */
 public static function get($addon)
 {
     if (!is_string($addon)) {
         throw new InvalidArgumentException('Expecting $addon to be string, but ' . gettype($addon) . ' given!');
     }
     if (!isset(self::$addons[$addon])) {
         return rex_null_addon::getInstance();
     }
     return self::$addons[$addon];
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function getAddon()
 {
     return rex_null_addon::getInstance();
 }