PHP Class Inpsyde\MultilingualPress\Asset\DebugAwareStyle

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Asset\Style
Datei anzeigen Open project: inpsyde/multilingual-press Class Usage Examples

Public Methods

Method Description
__construct ( string $handle, string $url, array $dependencies = [], string | null $version = '', string $media = 'all' ) Constructor. Sets up the properties.
__toString ( ) : string Returns the handle.
add_conditional ( string $conditional ) : static Adds the given conditional to the style.
dependencies ( ) : string[] Returns the dependencies.
from_location ( string $handle, AssetLocation $location, array $dependencies = [], string | null $version = '', string $media = 'all' ) : static Returns a new style object, instantiated according to the given arguments.
handle ( ) : string Returns the handle.
media ( ) : string Returns the style media data.
url ( ) : string Returns the file URL.
version ( ) : string | null Returns the file version.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $handle, string $url, array $dependencies = [], string | null $version = '', string $media = 'all' )
$handle string The handle.
$url string The public URL for the directory containing the file.
$dependencies array Optional. The dependencies. Defaults to empty array.
$version string | null Optional. Version of the file. Defaults to empty string.
$media string Optional. Style media data. Defaults to 'all'.

__toString() public method

Returns the handle.
Since: 3.0.0
public __toString ( ) : string
return string The handle.

add_conditional() public method

Adds the given conditional to the style.
Since: 3.0.0
public add_conditional ( string $conditional ) : static
$conditional string Conditional string.
return static Style instance.

dependencies() public method

Returns the dependencies.
Since: 3.0.0
public dependencies ( ) : string[]
return string[] The dependencies.

from_location() public static method

Returns a new style object, instantiated according to the given arguments.
Since: 3.0.0
public static from_location ( string $handle, AssetLocation $location, array $dependencies = [], string | null $version = '', string $media = 'all' ) : static
$handle string The handle.
$location AssetLocation Location object.
$dependencies array Optional. The dependencies. Defaults to empty array.
$version string | null Optional. Version of the file. Defaults to empty string.
$media string Optional. Style media data. Defaults to 'all'.
return static Style object.

handle() public method

Returns the handle.
Since: 3.0.0
public handle ( ) : string
return string The handle.

media() public method

Returns the style media data.
Since: 3.0.0
public media ( ) : string
return string The style media data.

url() public method

Returns the file URL.
Since: 3.0.0
public url ( ) : string
return string The file URL.

version() public method

Returns the file version.
Since: 3.0.0
public version ( ) : string | null
return string | null The file version.