Assets\Asset
ClassSource on GitHubRepresents an asset
$asset = new \Phalcon\Assets\Asset("js", "js/jquery.js");Phalcon\Assets\Asset- implementsPhalcon\Assets\AssetInterface
Uses Phalcon\Assets\Exceptions\CannotReadAsset · Phalcon\Assets\Traits\AttributesTrait · Phalcon\Assets\Traits\SourceTargetTrait · Phalcon\Traits\Php\FileTrait · Phalcon\Traits\Php\HashTrait
Method Summary
public__construct(string$type,string$path,bool$isLocal = true,bool$filter = true,array$attributes = [],string|null$version = null,bool$isAutoVersion = false)Asset constructor.publicstringgetAssetKey()Gets the asset's key.publicstringgetContent( string|null$basePath = null )Returns the content of the asset as an stringpublicboolgetFilter()Gets if the asset must be filtered or not.publicstringgetPath()Returns the path for this assetpublicstringgetRealSourcePath( string|null$basePath = null )Returns the complete location where the asset is locatedpublicstringgetRealTargetPath( string|null$basePath = null )Returns the complete location where the asset must be writtenpublicstringgetRealTargetUri()Returns the real target uri for the generated HTMLpublicstringgetType()Gets the asset's type.publicstring|nullgetVersion()Version of resourcepublicboolisAutoVersion()Checks if the asset is using auto versionpublicAssetInterfacesetAttributes( array$attributes )Sets extra HTML attributespublicAssetInterfacesetAutoVersion( bool$flag )publicAssetInterfacesetFilter( bool$filter )Sets if the asset must be filtered or notpublicAssetInterfacesetPath( string$path )Sets the asset's pathpublicAssetInterfacesetType( string$type )Sets the asset's typepublicAssetInterfacesetVersion( string$version )Sets the asset's versionProperties
protectedbool$filterprotectedbool$isAutoVersion = falseprotectedstring$pathprotectedstring$typeprotectedstring|null$versionVersion of resourceMethods
__construct()
public function __construct(
string $type,
string $path,
bool $isLocal = true,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $isAutoVersion = false
);Asset constructor.
getAssetKey()
public function getAssetKey(): string;Gets the asset’s key.
getContent()
public function getContent( string|null $basePath = null ): string;Returns the content of the asset as an string Optionally a base path where the asset is located can be set
getFilter()
public function getFilter(): bool;Gets if the asset must be filtered or not.
getPath()
public function getPath(): string;Returns the path for this asset
getRealSourcePath()
public function getRealSourcePath( string|null $basePath = null ): string;Returns the complete location where the asset is located
getRealTargetPath()
public function getRealTargetPath( string|null $basePath = null ): string;Returns the complete location where the asset must be written
getRealTargetUri()
public function getRealTargetUri(): string;Returns the real target uri for the generated HTML
getType()
public function getType(): string;Gets the asset’s type.
getVersion()
public function getVersion(): string|null;Version of resource
isAutoVersion()
public function isAutoVersion(): bool;Checks if the asset is using auto version
setAttributes()
public function setAttributes( array $attributes ): AssetInterface;Sets extra HTML attributes
setAutoVersion()
public function setAutoVersion( bool $flag ): AssetInterface;setFilter()
public function setFilter( bool $filter ): AssetInterface;Sets if the asset must be filtered or not
setPath()
public function setPath( string $path ): AssetInterface;Sets the asset’s path
setType()
public function setType( string $type ): AssetInterface;Sets the asset’s type
setVersion()
public function setVersion( string $version ): AssetInterface;Sets the asset’s version
Assets\AssetInterface
InterfaceSource on GitHubPhalcon\Assets\AssetInterface
Phalcon\Contracts\Assets\AssetPhalcon\Assets\AssetInterface
Uses Phalcon\Contracts\Assets\Asset
Assets\Asset\Css
ClassSource on GitHubRepresents CSS assets
Phalcon\Assets\AssetPhalcon\Assets\Asset\Css
Uses Phalcon\Assets\Asset
Method Summary
Methods
__construct()
public function __construct(
string $path,
bool $local = true,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
);Phalcon\Assets\Asset\Css constructor
Assets\Asset\Js
ClassSource on GitHubRepresents JavaScript assets
Phalcon\Assets\AssetPhalcon\Assets\Asset\Js
Uses Phalcon\Assets\Asset
Method Summary
Methods
__construct()
public function __construct(
string $path,
bool $local = true,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
);Phalcon\Assets\Asset\Js constructor
Assets\Collection
ClassSource on GitHubCollection of asset objects
Phalcon\Assets\Collection- implements\Countable,\IteratorAggregate
Uses ArrayIterator · Countable · IteratorAggregate · Phalcon\Assets\Traits\AttributesTrait · Phalcon\Assets\Traits\SourceTargetTrait · Phalcon\Traits\Php\FileTrait
Method Summary
publicstaticadd( AssetInterface$asset )Adds an asset to the collectionpublicstaticaddCss(string$path,mixed$isLocal = null,bool$filter = true,array$attributes = [],string|null$version = null,bool$autoVersion = false)Adds a CSS asset to the collectionpublicstaticaddFilter( FilterInterface$filter )Adds a filter to the collectionpublicstaticaddInline( Inline$code )Adds an inline code to the collectionpublicstaticaddInlineCss(string$content,bool$filter = true,array$attributes = [])Adds an inline CSS to the collectionpublicstaticaddInlineJs(string$content,bool$filter = true,array$attributes = [])Adds an inline JavaScript to the collectionpublicstaticaddJs(string$path,mixed$isLocal = null,bool$filter = true,array$attributes = [],string|null$version = null,bool$autoVersion = false)Adds a JavaScript asset to the collectionpublicintcount()Return the count of the assetspublicarraygetAssets()Return the stored assetspublicarraygetCodes()Return the stored codespublicarraygetFilters()Return the stored filterspublic\TraversablegetIterator()Returns the generator of the classpublicboolgetJoin()publicstringgetPrefix()Returns the prefixpublicstringgetRealTargetPath( string$basePath )Returns the complete location where the joined/filtered collection mustpublicboolgetTargetIsLocal()Returns whether the target is local or notpublicstringgetVersion()Returns the versionpublicboolhas( AssetInterface$asset )Checks this the asset is added to the collection.publicboolisAutoVersion()Checks if collection is using auto versionpublicstaticjoin( bool$flag )Sets if all filtered assets in the collection must be joined in a singlepublicstaticsetAttributes( array$attributes )Sets extra HTML attributespublicstaticsetAutoVersion( bool$flag )publicstaticsetFilters( array$filters )Sets an array of filters in the collectionpublicstaticsetPrefix( string$prefix )Sets a common prefix for all the assetspublicstaticsetTargetIsLocal( bool$flag )Sets if the target local or notpublicstaticsetVersion( string$version )Sets the versionprotectedbooladdAsset( AssetInterface$asset )Adds an asset or inline-code to the collectionProperties
protectedarray$assets = []protectedbool$autoVersion = falseShould version be determined from file modification timeprotectedarray$codes = []protectedarray$filters = []protectedbool$join = trueprotectedstring$prefix = ""protectedbool$targetIsLocal = trueprotectedstring$version = ""Methods
add()
public function add( AssetInterface $asset ): static;Adds an asset to the collection
addCss()
public function addCss(
string $path,
mixed $isLocal = null,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
): static;Adds a CSS asset to the collection
addFilter()
public function addFilter( FilterInterface $filter ): static;Adds a filter to the collection
addInline()
public function addInline( Inline $code ): static;Adds an inline code to the collection
addInlineCss()
public function addInlineCss(
string $content,
bool $filter = true,
array $attributes = []
): static;Adds an inline CSS to the collection
addInlineJs()
public function addInlineJs(
string $content,
bool $filter = true,
array $attributes = []
): static;Adds an inline JavaScript to the collection
addJs()
public function addJs(
string $path,
mixed $isLocal = null,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
): static;Adds a JavaScript asset to the collection
count()
public function count(): int;Return the count of the assets
@link https://php.net/manual/en/countable.count.php
getAssets()
public function getAssets(): array;Return the stored assets
getCodes()
public function getCodes(): array;Return the stored codes
getFilters()
public function getFilters(): array;Return the stored filters
getIterator()
public function getIterator(): \Traversable;Returns the generator of the class
@link https://php.net/manual/en/iteratoraggregate.getiterator.php
getJoin()
public function getJoin(): bool;getPrefix()
public function getPrefix(): string;Returns the prefix
getRealTargetPath()
public function getRealTargetPath( string $basePath ): string;Returns the complete location where the joined/filtered collection must be written
getTargetIsLocal()
public function getTargetIsLocal(): bool;Returns whether the target is local or not
getVersion()
public function getVersion(): string;Returns the version
has()
public function has( AssetInterface $asset ): bool;Checks this the asset is added to the collection.
use Phalcon\Assets\Asset;
use Phalcon\Assets\Collection;
$collection = new Collection();
$asset = new Asset("js", "js/jquery.js");
$collection->add($asset);
$collection->has($asset); // trueisAutoVersion()
public function isAutoVersion(): bool;Checks if collection is using auto version
join()
public function join( bool $flag ): static;Sets if all filtered assets in the collection must be joined in a single result file
setAttributes()
public function setAttributes( array $attributes ): static;Sets extra HTML attributes
setAutoVersion()
public function setAutoVersion( bool $flag ): static;setFilters()
public function setFilters( array $filters ): static;Sets an array of filters in the collection
setPrefix()
public function setPrefix( string $prefix ): static;Sets a common prefix for all the assets
setTargetIsLocal()
public function setTargetIsLocal( bool $flag ): static;Sets if the target local or not
setVersion()
public function setVersion( string $version ): static;Sets the version
addAsset()
final protected function addAsset( AssetInterface $asset ): bool;Adds an asset or inline-code to the collection
Assets\Exception
ClassSource on GitHubExceptions thrown in Phalcon\Assets will use this class
\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\AssetSourceTargetCollisionPhalcon\Assets\Exceptions\CannotReadAssetPhalcon\Assets\Exceptions\CollectionNotFoundPhalcon\Assets\Exceptions\InvalidAssetSourcePathPhalcon\Assets\Exceptions\InvalidAssetTargetPathPhalcon\Assets\Exceptions\InvalidFilterPhalcon\Assets\Exceptions\InvalidTargetPathPhalcon\Assets\Exceptions\TargetPathIsDirectory
Assets\Exceptions\AssetSourceTargetCollision
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\AssetSourceTargetCollision
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\Exceptions\CannotReadAsset
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\CannotReadAsset
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\Exceptions\CollectionNotFound
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\CollectionNotFound
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $name = "" );Assets\Exceptions\InvalidAssetSourcePath
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\InvalidAssetSourcePath
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\Exceptions\InvalidAssetTargetPath
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\InvalidAssetTargetPath
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\Exceptions\InvalidFilter
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\InvalidFilter
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct();Assets\Exceptions\InvalidTargetPath
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\InvalidTargetPath
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\Exceptions\TargetPathIsDirectory
ClassSource on GitHub\ExceptionPhalcon\Assets\ExceptionPhalcon\Assets\Exceptions\TargetPathIsDirectory
Uses Phalcon\Assets\Exception
Method Summary
Methods
__construct()
public function __construct( string $path );Assets\FilterInterface
InterfaceSource on GitHubPhalcon\Assets\FilterInterface
Phalcon\Contracts\Assets\FilterPhalcon\Assets\FilterInterface
Uses Phalcon\Contracts\Assets\Filter
Assets\Filters\Cssmin
ClassSource on GitHubFilter intended to minify CSS content (remove comments, newlines, and line feeds, and drop the last semicolon of the last property).
NOTE: This functionality is not currently available;
filter()returns the content unchanged. {: .alert .alert-info }
Phalcon\Assets\Filters\Cssmin- implementsPhalcon\Assets\FilterInterface
Uses Phalcon\Assets\FilterInterface
Method Summary
Methods
filter()
public function filter( string $content ): string;Filters the content using CSSMIN
Assets\Filters\Jsmin
ClassSource on GitHubFilter intended to minify JavaScript content (remove comments and the characters that are insignificant to JavaScript - tabs, carriage returns, and most spaces and linefeeds).
NOTE: This functionality is not currently available;
filter()returns the content unchanged. {: .alert .alert-info }
Phalcon\Assets\Filters\Jsmin- implementsPhalcon\Assets\FilterInterface
Uses Phalcon\Assets\FilterInterface
Method Summary
Methods
filter()
public function filter( string $content ): string;Filters the content using JSMIN
Assets\Filters\None
ClassSource on GitHubReturns the content without make any modification to the original source
Phalcon\Assets\Filters\None- implementsPhalcon\Assets\FilterInterface
Uses Phalcon\Assets\FilterInterface
Method Summary
Methods
filter()
public function filter( string $content ): string;Returns the content as is
Assets\Inline
ClassSource on GitHubRepresents an inline asset
$inline = new \Phalcon\Assets\Inline("js", "alert('hello world');");Phalcon\Assets\Inline- implementsPhalcon\Assets\AssetInterface
Uses Phalcon\Assets\Traits\AttributesTrait · Phalcon\Traits\Php\HashTrait
Method Summary
public__construct(string$type,string$content,bool$filter = true,array$attributes = [])Phalcon\Assets\Inline constructorpublicstringgetAssetKey()Gets the asset's key.publicstringgetContent()Gets if the asset contentpublicboolgetFilter()Gets if the asset must be filtered or not.publicstringgetType()Gets the asset's type.publicAssetInterfacesetAttributes( array$attributes )Sets extra HTML attributespublicAssetInterfacesetFilter( bool$filter )Sets if the asset must be filtered or notpublicAssetInterfacesetType( string$type )Sets the inline's typeProperties
protectedstring$contentprotectedbool$filterprotectedstring$typeMethods
__construct()
public function __construct(
string $type,
string $content,
bool $filter = true,
array $attributes = []
);Phalcon\Assets\Inline constructor
getAssetKey()
public function getAssetKey(): string;Gets the asset’s key.
getContent()
public function getContent(): string;Gets if the asset content
getFilter()
public function getFilter(): bool;Gets if the asset must be filtered or not.
getType()
public function getType(): string;Gets the asset’s type.
setAttributes()
public function setAttributes( array $attributes ): AssetInterface;Sets extra HTML attributes
setFilter()
public function setFilter( bool $filter ): AssetInterface;Sets if the asset must be filtered or not
setType()
public function setType( string $type ): AssetInterface;Sets the inline’s type
Assets\Inline\Css
ClassSource on GitHubRepresents an inlined CSS
Phalcon\Assets\InlinePhalcon\Assets\Inline\Css
Uses Phalcon\Assets\Inline
Method Summary
Methods
__construct()
public function __construct(
string $content,
bool $filter = true,
array $attributes = []
);Phalcon\Assets\Inline\Css constructor
Assets\Inline\Js
ClassSource on GitHubRepresents an inline JavaScript
Phalcon\Assets\InlinePhalcon\Assets\Inline\Js
Uses Phalcon\Assets\Inline
Method Summary
Methods
__construct()
public function __construct(
string $content,
bool $filter = true,
array $attributes = []
);Phalcon\Assets\Inline\Js constructor
Assets\Manager
ClassSource on GitHubManages collections of CSS/JavaScript assets
\stdClassPhalcon\Di\AbstractInjectionAwarePhalcon\Assets\Manager
Uses Phalcon\Assets\Asset\Css · Phalcon\Assets\Asset\Js · Phalcon\Assets\Exceptions\AssetSourceTargetCollision · Phalcon\Assets\Exceptions\CollectionNotFound · Phalcon\Assets\Exceptions\InvalidAssetSourcePath · Phalcon\Assets\Exceptions\InvalidAssetTargetPath · Phalcon\Assets\Exceptions\InvalidFilter · Phalcon\Assets\Exceptions\InvalidTargetPath · Phalcon\Assets\Exceptions\TargetPathIsDirectory · Phalcon\Assets\Inline\Css · Phalcon\Assets\Inline\Js · Phalcon\Di\AbstractInjectionAware · Phalcon\Html\Helper\Element · Phalcon\Html\Helper\Link · Phalcon\Html\Helper\Script · Phalcon\Html\TagFactory · Phalcon\Traits\Php\FileTrait
Method Summary
public__construct(TagFactory$tagFactory,array$options = [])Manager constructor.publicstaticaddAsset( Asset$asset )Adds a raw asset to the managerpublicstaticaddAssetByType(string$type,Asset$asset)Adds a asset by its typepublicstaticaddCss(string$path,bool$local = true,bool$filter = true,array$attributes = [],string|null$version = null,bool$autoVersion = false)Adds a CSS asset to the 'css' collectionpublicstaticaddInlineCode( Inline$code )Adds a raw inline code to the managerpublicstaticaddInlineCodeByType(string$type,Inline$code)Adds an inline code by its typepublicstaticaddInlineCss(string$content,bool$filter = true,array$attributes = [])Adds an inline CSS to the 'css' collectionpublicstaticaddInlineJs(string$content,bool$filter = true,array$attributes = [])Adds an inline JavaScript to the 'js' collectionpublicstaticaddJs(string$path,bool$local = true,bool$filter = true,array$attributes = [],string|null$version = null,bool$autoVersion = false)Adds a JavaScript asset to the 'js' collectionpublicCollectioncollection( string$name )Creates/Returns a collection of assetspublicarraycollectionAssetsByType(array$assets,string$type)Creates/Returns a collection of assets by typepublicboolexists( string$name )Returns true or false if collection exists.publicCollectionget( string$name )Returns a collection by its id.publicCollection[]getCollections()Returns existing collections in the managerpublicCollectiongetCss()Returns the CSS collection of assetspublicCollectiongetJs()Returns the CSS collection of assetspublicarraygetOptions()Returns the manager optionspublicboolhas( string$name )Returns true or false if collection exists.publicstring|nulloutput(Collection$collection,string$type)Traverses a collection calling the callback to generate its HTMLpublicstringoutputCss( string|null$name = null )Prints the HTML for CSS assetspublicstringoutputInline(Collection$collection,mixed$type)Traverses a collection and generate its HTMLpublicstringoutputInlineCss( string|null$name = null )Prints the HTML for inline CSSpublicstringoutputInlineJs( string|null$name = null )Prints the HTML for inline JSpublicstringoutputJs( string|null$name = null )Prints the HTML for JS assetspublicstaticset(string$name,Collection$collection)Sets a collection in the Assets ManagerpublicstaticsetOptions( array$options )Sets the manager optionspublicstaticuseImplicitOutput( bool$implicitOutput )Sets if the HTML generated must be directly printed or returnedProperties
protectedarray$collections = []protectedbool$implicitOutput = trueprotectedarray$options = []protectedTagFactory$tagFactoryMethods
__construct()
public function __construct(
TagFactory $tagFactory,
array $options = []
);Manager constructor.
addAsset()
public function addAsset( Asset $asset ): static;Adds a raw asset to the manager
addAssetByType()
public function addAssetByType(
string $type,
Asset $asset
): static;Adds a asset by its type
addCss()
public function addCss(
string $path,
bool $local = true,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
): static;Adds a CSS asset to the ‘css’ collection
addInlineCode()
public function addInlineCode( Inline $code ): static;Adds a raw inline code to the manager
addInlineCodeByType()
public function addInlineCodeByType(
string $type,
Inline $code
): static;Adds an inline code by its type
addInlineCss()
public function addInlineCss(
string $content,
bool $filter = true,
array $attributes = []
): static;Adds an inline CSS to the ‘css’ collection
addInlineJs()
public function addInlineJs(
string $content,
bool $filter = true,
array $attributes = []
): static;Adds an inline JavaScript to the ‘js’ collection
addJs()
public function addJs(
string $path,
bool $local = true,
bool $filter = true,
array $attributes = [],
string|null $version = null,
bool $autoVersion = false
): static;Adds a JavaScript asset to the ‘js’ collection
$assets->addJs("scripts/jquery.js");
$assets->addJs("http://jquery.my-cdn.com/jquery.js", false);collection()
public function collection( string $name ): Collection;Creates/Returns a collection of assets
collectionAssetsByType()
public function collectionAssetsByType(
array $assets,
string $type
): array;Creates/Returns a collection of assets by type
exists()
public function exists( string $name ): bool;Returns true or false if collection exists.
if ($manager->exists("jsHeader")) {
// \Phalcon\Assets\Collection
$collection = $manager->get("jsHeader");
}get()
public function get( string $name ): Collection;Returns a collection by its id.
$scripts = $assets->get("js");getCollections()
public function getCollections(): Collection[];Returns existing collections in the manager
getCss()
public function getCss(): Collection;Returns the CSS collection of assets
getJs()
public function getJs(): Collection;Returns the CSS collection of assets
getOptions()
public function getOptions(): array;Returns the manager options
has()
public function has( string $name ): bool;Returns true or false if collection exists.
if ($manager->has("jsHeader")) {
// \Phalcon\Assets\Collection
$collection = $manager->get("jsHeader");
}output()
public function output(
Collection $collection,
string $type
): string|null;Traverses a collection calling the callback to generate its HTML
outputCss()
public function outputCss( string|null $name = null ): string;Prints the HTML for CSS assets
outputInline()
public function outputInline(
Collection $collection,
mixed $type
): string;Traverses a collection and generate its HTML
outputInlineCss()
public function outputInlineCss( string|null $name = null ): string;Prints the HTML for inline CSS
outputInlineJs()
public function outputInlineJs( string|null $name = null ): string;Prints the HTML for inline JS
outputJs()
public function outputJs( string|null $name = null ): string;Prints the HTML for JS assets
set()
public function set(
string $name,
Collection $collection
): static;Sets a collection in the Assets Manager
$assets->set("js", $collection);setOptions()
public function setOptions( array $options ): static;Sets the manager options
useImplicitOutput()
public function useImplicitOutput( bool $implicitOutput ): static;Sets if the HTML generated must be directly printed or returned
Assets\Traits\AttributesTrait
TraitSource on GitHubShared HTML-attributes state for asset objects (Asset, Inline,
Collection).
@todo set attributes to have a default array when introduced in zephir @todo v7 - share setAttributes here too (blocked: Collection is not an AssetInterface, so the return type diverges)
Phalcon\Assets\Traits\AttributesTrait
Used by Phalcon\Assets\Asset · Phalcon\Assets\Collection · Phalcon\Assets\Inline
Method Summary
Properties
protectedarray$attributes = nullMethods
getAttributes()
public function getAttributes(): array;Gets extra HTML attributes.
Assets\Traits\SourceTargetTrait
TraitSource on GitHubShared source/target path, uri and locality state for asset objects
(Asset, Collection).
Phalcon\Assets\Traits\SourceTargetTrait
Used by Phalcon\Assets\Asset · Phalcon\Assets\Collection
Method Summary
publicstringgetSourcePath()publicstringgetTargetPath()publicstringgetTargetUri()publicboolisLocal()Checks if the asset is local or notpublicstaticsetIsLocal( bool$flag )Sets if the asset is local or externalpublicstaticsetSourcePath( string$sourcePath )Sets the asset's source pathpublicstaticsetTargetPath( string$targetPath )Sets the asset's target pathpublicstaticsetTargetUri( string$targetUri )Sets a target uri for the generated HTMLProperties
protectedbool$isLocal = trueprotectedstring$sourcePath = ""protectedstring$targetPath = ""protectedstring$targetUri = ""Methods
getSourcePath()
public function getSourcePath(): string;getTargetPath()
public function getTargetPath(): string;getTargetUri()
public function getTargetUri(): string;isLocal()
public function isLocal(): bool;Checks if the asset is local or not
setIsLocal()
public function setIsLocal( bool $flag ): static;Sets if the asset is local or external
setSourcePath()
public function setSourcePath( string $sourcePath ): static;Sets the asset’s source path
setTargetPath()
public function setTargetPath( string $targetPath ): static;Sets the asset’s target path
setTargetUri()
public function setTargetUri( string $targetUri ): static;Sets a target uri for the generated HTML