Assets.php
public static function get(string $asset_type, string $namespace) : array
    {
        $assets = [];

        // is there some registered $assets for current $namespace ?
        if (isset(Assets::$assets[$namespace])
            && isset(Assets::$assets[$namespace][$asset_type])
            && count(Assets::$assets[$namespace][$asset_type]) > 0) {

            // Get all $assets for given $namespace and $asset_type.
            $assets = Assets::$assets[$namespace][$asset_type];

            // Sort $assets by priority from low to high
            ksort($assets);
        }

        // Return $assets
        return $assets;
    }
public static function get(string $asset_type, string $namespace) : array
    {
        $assets = [];

        // is there some registered $assets for current $namespace ?
        if (isset(Assets::$assets[$namespace])
            && isset(Assets::$assets[$namespace][$asset_type])
            && count(Assets::$assets[$namespace][$asset_type]) > 0) {

            // Get all $assets for given $namespace and $asset_type.
            $assets = Assets::$assets[$namespace][$asset_type];

            // Sort $assets by priority from low to high
            ksort($assets);
        }

        // Return $assets
        return $assets;
    }
public static function get ( string $ asset_type , string $ namespace ) : array { $ assets = [ ] ; // is there some registered $assets for current $namespace ? if ( isset ( Assets :: $ assets [ $ namespace ] ) && isset ( Assets :: $ assets [ $ namespace ] [ $ asset_type ] ) && count ( Assets :: $ assets [ $ namespace ] [ $ asset_type ] ) > 0 ) { // Get all $assets for given $namespace and $asset_type. $ assets = Assets :: $ assets [ $ namespace ] [ $ asset_type ] ; // Sort $assets by priority from low to high ksort ( $ assets ) ; } // Return $assets return $ assets ; }
Get assets for current namespace and asset type

$css = Assets::get('css', 'site');
$js  = Assets::get('js', 'site');

@param  string $asset_type
@param  string $namespace
@return array
Get assets for current namespace and asset type