AssetDescriptor
class AssetDescriptor implements AssetInterface
Class AssetDescriptor
Properties
string | $assetType | ||
string | $deliveryType | ||
int|string | $version | ||
string | $location | ||
string | $filename | ||
string | $extension |
Methods
AssetDescriptor constructor.
Gets inaccessible class property by name.
Indicates whether the inaccessible class property is set.
Sets the inaccessible class property.
Sets the public ID of the asset.
Gets the public ID of the asset
Sets the URL SEO suffix of the asset.
Creates a new asset from the provided string (URL).
Creates a new asset from the provided JSON.
Creates a new asset from the provided source and an array of (legacy) parameters.
Imports data from the provided string (URL).
Imports data from the provided JSON.
Serializes to string.
No description
Details
__construct(string $publicId, string $assetType = AssetType::IMAGE)
AssetDescriptor constructor.
mixed|null
__get(string $name)
Gets inaccessible class property by name.
bool
__isset(string $key)
Indicates whether the inaccessible class property is set.
__set(string $name, mixed $value)
Sets the inaccessible class property.
$this
setPublicId(string $publicId)
Sets the public ID of the asset.
string
publicId(bool $noExtension = false)
Gets the public ID of the asset
$this
setSuffix(string $suffix)
Sets the URL SEO suffix of the asset.
static mixed
fromString(string $string)
Creates a new asset from the provided string (URL).
static mixed
fromJson(string|array $json)
Creates a new asset from the provided JSON.
static mixed
fromParams(string $source, array $params = [])
Creates a new asset from the provided source and an array of (legacy) parameters.
mixed
importString(string $string)
Imports data from the provided string (URL).
AssetDescriptor
importJson(string|array $json)
Imports data from the provided JSON.
string
__toString()
Serializes to string.