SearchAsset
class SearchAsset extends BaseAsset implements SearchQueryInterface
Class SearchAsset
Properties
CloudConfig | $cloud | from BaseAsset | |
UrlConfig | $urlConfig | from BaseAsset | |
AssetDescriptor | $asset | from BaseAsset | |
AuthToken | $authToken | from BaseAsset |
Methods
Whether to automatically build URLs with multiple CDN sub-domains.
Whether to use secure CDN sub-domain.
The custom domain name to use for building HTTP URLs.
Force HTTPS URLs for resources even if they are embedded in non-secure HTTP pages.
The domain name of the CDN distribution to use for building HTTPS URLs.
Set this parameter to true if you are an Advanced plan user with a private CDN distribution.
Set to true to create a signed Cloudinary URL.
Setting both this and signUrl to true will sign the URL using the first 32 characters of a SHA-256 hash.
Set to true to use shorten asset type.
Set to true to omit type and resource_type in the URL.
Set to false to omit default version string for assets in folders in the delivery URL.
Set to false to omit analytics.
SearchAsset constructor.
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 parameters.
Imports data from the provided string (URL).
Imports data from the provided JSON.
Returns the public ID of the asset.
Sets the public ID of the asset.
Creates a signed Search URL that can be used on the client side.
Serializes to string.
No description
Details
$this
cdnSubdomain(bool $cdnSubdomain = true)
Whether to automatically build URLs with multiple CDN sub-domains.
$this
secureCdnSubdomain(bool $secureCdnSubdomain = true)
Whether to use secure CDN sub-domain.
$this
cname(string $cname)
The custom domain name to use for building HTTP URLs.
Relevant only for Advanced plan users that have a private CDN distribution and a custom CNAME.
$this
secure(bool $secure = true)
Force HTTPS URLs for resources even if they are embedded in non-secure HTTP pages.
$this
secureCname(string $secureCname)
The domain name of the CDN distribution to use for building HTTPS URLs.
Relevant only for Advanced plan users that have a private CDN distribution.
$this
privateCdn(bool $privateCdn = true)
Set this parameter to true if you are an Advanced plan user with a private CDN distribution.
$this
signUrl(bool $signUrl = true)
Set to true to create a signed Cloudinary URL.
$this
longUrlSignature(bool $longUrlSignature = true)
Setting both this and signUrl to true will sign the URL using the first 32 characters of a SHA-256 hash.
$this
shorten(bool $shorten = true)
Set to true to use shorten asset type.
$this
useRootPath(bool $useRootPath = true)
Set to true to omit type and resource_type in the URL.
$this
forceVersion(bool $forceVersion = true)
Set to false to omit default version string for assets in folders in the delivery URL.
$this
analytics(bool $analytics = true)
Set to false to omit analytics.
__construct(mixed $configuration = null)
SearchAsset constructor.
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 parameters.
mixed
importString(string $string)
Imports data from the provided string (URL).
mixed
importJson(string|array $json)
Imports data from the provided JSON.
BaseAsset
configuration(array|Configuration $configuration)
Sets the asset configuration.
BaseAsset
importConfiguration(array|Configuration $configuration)
Imports (merges) the asset configuration.
string
getPublicId(bool $omitExtension = false)
Returns the public ID of the asset.
BaseAsset
setPublicId(string $publicId)
Sets the public ID of the asset.
string
toUrl(int $ttl = null, string $nextCursor = null)
Creates a signed Search URL that can be used on the client side.
string
__toString()
Serializes to string.