PHP Class Efficiently\Larasset\Asset

Show file Open project: efficiently/larasset

Protected Properties

Property Type Description
$args
$assetPort
$assetsHost
$assetsPrefix
$manifests

Public Methods

Method Description
__construct ( mixed $args = null ) Mutiple args $dir, $path, $options
assetPath ( string $source, array $options = [] ) : string Computes the path to asset in public directory.
assetUrl ( string $source, array $options = [] ) : string Computes the full URL to a asset in the public directory.
faviconLinkTag ( string $source = null, array $attributes = [] ) : string Returns a HTML favicon link tag for the source and attributes specified as arguments.
imageTag ( string $source, string $alt = null, array $attributes = [] ) : string Returns an HTML image element for the source and attributes specified as arguments from the assets pipeline.
javascriptIncludeTag ( array | string $sources = "application", array $attributes = [] ) : string Returns an HTML script tag for the sources and attributes specified as arguments.
manifest ( $args = null )
stylesheetLinkTag ( array | string $sources = "application", array $attributes = [] ) : string Returns a HTML stylesheet link tag for the sources and attributes specified as arguments.

Protected Methods

Method Description
getHostname ( )

Method Details

__construct() public method

Mutiple args $dir, $path, $options
public __construct ( mixed $args = null )
$args mixed

assetPath() public method

Computes the path to asset in public directory.
public assetPath ( string $source, array $options = [] ) : string
$source string
$options array
return string

assetUrl() public method

This will use Asset::assetPath() internally, so most of their behaviors will be the same.
public assetUrl ( string $source, array $options = [] ) : string
$source string
$options array
return string

faviconLinkTag() public method

Returns a HTML favicon link tag for the source and attributes specified as arguments.
public faviconLinkTag ( string $source = null, array $attributes = [] ) : string
$source string Relative URL
$attributes array HTML attributes
return string

getHostname() protected method

protected getHostname ( )

imageTag() public method

Returns an HTML image element for the source and attributes specified as arguments from the assets pipeline.
public imageTag ( string $source, string $alt = null, array $attributes = [] ) : string
$source string Relative URL
$alt string
$attributes array HTML attributes
return string

javascriptIncludeTag() public method

Returns an HTML script tag for the sources and attributes specified as arguments.
public javascriptIncludeTag ( array | string $sources = "application", array $attributes = [] ) : string
$sources array | string default "application"
$attributes array HTML attributes
return string

manifest() public method

public manifest ( $args = null )

stylesheetLinkTag() public method

Returns a HTML stylesheet link tag for the sources and attributes specified as arguments.
public stylesheetLinkTag ( array | string $sources = "application", array $attributes = [] ) : string
$sources array | string default "application"
$attributes array HTML attributes
return string

Property Details

$args protected property

protected $args

$assetPort protected property

protected $assetPort

$assetsHost protected property

protected $assetsHost

$assetsPrefix protected property

protected $assetsPrefix

$manifests protected property

protected $manifests