public static function getAddonProvidingClazzOrNamespace(string $clazzOrNamespace)
    {
        $addons = self::getAddons();
        foreach ($addons as $addon) {
            if (empty($addon->getComponents())) {
                continue;
            }
            
            foreach ($addon->getComponents() as $component) {
                if (!empty($component->getClass()) && $component->getClass() == $clazzOrNamespace) {
                    return $addon;
                }
                
                if (!empty($component->getNamespace()) && (strpos($clazzOrNamespace, $component->getNamespace()) === 0)) {
                    return $addon;
                }
            }
        }
        
        return null;
    }
public static function getAddonProvidingClazzOrNamespace(string $clazzOrNamespace)
    {
        $addons = self::getAddons();
        foreach ($addons as $addon) {
            if (empty($addon->getComponents())) {
                continue;
            }
            
            foreach ($addon->getComponents() as $component) {
                if (!empty($component->getClass()) && $component->getClass() == $clazzOrNamespace) {
                    return $addon;
                }
                
                if (!empty($component->getNamespace()) && (strpos($clazzOrNamespace, $component->getNamespace()) === 0)) {
                    return $addon;
                }
            }
        }
        
        return null;
    }
public static function getAddonProvidingClazzOrNamespace ( string $ clazzOrNamespace ) { $ addons = self :: getAddons ( ) ; foreach ( $ addons as $ addon ) { if ( empty ( $ addon -> getComponents ( ) ) ) { continue ; } foreach ( $ addon -> getComponents ( ) as $ component ) { if ( ! empty ( $ component -> getClass ( ) ) && $ component -> getClass ( ) == $ clazzOrNamespace ) { return $ addon ; } if ( ! empty ( $ component -> getNamespace ( ) ) && ( strpos ( $ clazzOrNamespace , $ component -> getNamespace ( ) ) === 0 ) ) { return $ addon ; } } } return null ; }
Get addon configured to provide a certain class or namespace.

@param string $clazzOrNamespace
The class or namespace the addon should be configured to provide.

@return Addon The a configured to provide a certain class or namespace.
Get addon configured to provide a certain class or namespace .