PHP Class Inpsyde\MultilingualPress\Asset\DebugAwareAssetURL

Since: 3.0.0
Inheritance: implements Inpsyde\MultilingualPress\Asset\AssetURL
Datei anzeigen Open project: inpsyde/multilingual-press

Public Methods

Method Description
__construct ( string $file, string $dir_path, string $dir_url ) Constructor. Sets up the properties.
__toString ( ) : string Returns the URL string.
from_location ( AssetLocation $location ) : static Returns a new URL object, instantiated according to the given location object.
version ( ) : string Returns the file version.

Private Methods

Method Description
get_file ( string $file, string $dir_path ) : string Returns the name of the minified version of the given file if it exists and not debugging, otherwise the unmodified file.
get_minified_file ( string $file ) : string Returns the given file with inserted ".min" infix, if not already minified file.

Method Details

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $file, string $dir_path, string $dir_url )
$file string File name (e.g., admin.css).
$dir_path string Local path to the directory containing the file.
$dir_url string Public URL for the directory containing the file.

__toString() public method

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

from_location() public static method

Returns a new URL object, instantiated according to the given location object.
Since: 3.0.0
public static from_location ( AssetLocation $location ) : static
$location AssetLocation Asset location object.
return static URL object.

version() public method

Returns the file version.
Since: 3.0.0
public version ( ) : string
return string File version.