src/Components.php
public static function filter($sType): array
    {
        if (!isset(static::$aCache[$sType])) {

            $aComponents            = static::available();
            static::$aCache[$sType] = [];

            foreach ($aComponents as $oComponent) {
                if ($oComponent->type === $sType) {
                    static::$aCache[$sType][] = $oComponent;
                }
            }
        }

        return static::$aCache[$sType];
    }
public static function filter($sType): array
    {
        if (!isset(static::$aCache[$sType])) {

            $aComponents            = static::available();
            static::$aCache[$sType] = [];

            foreach ($aComponents as $oComponent) {
                if ($oComponent->type === $sType) {
                    static::$aCache[$sType][] = $oComponent;
                }
            }
        }

        return static::$aCache[$sType];
    }
public static function filter ( $ sType ) : array { if ( ! isset ( static :: $ aCache [ $ sType ] ) ) { $ aComponents = static :: available ( ) ; static :: $ aCache [ $ sType ] = [ ] ; foreach ( $ aComponents as $ oComponent ) { if ( $ oComponent -> type === $ sType ) { static :: $ aCache [ $ sType ] [ ] = $ oComponent ; } } } return static :: $ aCache [ $ sType ] ; }
Returns a filtered array of components

@param string $sType The type of component to return

@return Component[]
Returns a filtered array of components