public static function fromUrl($cssUrl, $baseUrl, $mediaType = 'all')
    {
        // Match URL.
        if (strpos($cssUrl, $baseUrl) === false) {
            throw new \InvalidArgumentException('The CSS URL does not begin with the base URL');
        }

        // Create.
        $baseLength = strlen(rtrim($baseUrl, '/')) + 1;
        $path = substr($cssUrl, $baseLength);
        return new CssResource($path, $mediaType);
    }
public static function fromUrl($cssUrl, $baseUrl, $mediaType = 'all')
    {
        // Match URL.
        if (strpos($cssUrl, $baseUrl) === false) {
            throw new \InvalidArgumentException('The CSS URL does not begin with the base URL');
        }

        // Create.
        $baseLength = strlen(rtrim($baseUrl, '/')) + 1;
        $path = substr($cssUrl, $baseLength);
        return new CssResource($path, $mediaType);
    }
public static function fromUrl ( $ cssUrl , $ baseUrl , $ mediaType = 'all' ) { // Match URL. if ( strpos ( $ cssUrl , $ baseUrl ) === false ) { throw new \ InvalidArgumentException ( 'The CSS URL does not begin with the base URL' ) ; } // Create. $ baseLength = strlen ( rtrim ( $ baseUrl , '/' ) ) + 1 ; $ path = substr ( $ cssUrl , $ baseLength ) ; return new CssResource ( $ path , $ mediaType ) ; }
Creates a CSS resource from URL.
Creates a CSS resource from URL .