October\Rain\Assetic\Util\CssUtils

CSS Utils.

Public methods

public static array extractImports(string $content)

Extracts all references from the supplied CSS content.

Parameters
  • string $content - The CSS content

public static string filterCommentless(string $content, callable $callback)

Filters each non-comment part through a callable.

Parameters
  • string $content - The CSS
  • callable $callback - A PHP callable

public static string filterIEFilters(string $content, callable $callback)

Filters all IE filters (AlphaImageLoader filter) through a callable.

Parameters
  • string $content - The CSS
  • callable $callback - A PHP callable

public static string filterImports(string $content, callable $callback, Boolean $includeUrl=true)

Filters all CSS imports through a callable.

Parameters
  • string $content - The CSS
  • callable $callback - A PHP callable
  • Boolean $includeUrl - Whether to include url() in the pattern

public static string filterReferences(string $content, callable $callback)

Filters all references — url() and "@import" — through a callable.

Parameters
  • string $content - The CSS
  • callable $callback - A PHP callable

public static string filterUrls(string $content, callable $callback)

Filters all CSS url()'s through a callable.

Parameters
  • string $content - The CSS
  • callable $callback - A PHP callable