Resource
in package
Description of Resource
Tags
Table of Contents
Constants
- DEFAULT_MAX_FILE_SIZE_MB = 1000
- DEFAULT_MIN_FILE_SIZE_MB = 50
- MIME = 'model/gltf-binary'
Properties
Methods
- __construct() : mixed
- cacheHandler() : ResponseCacheItem
- Gets the requested repository resource metadata and converts it to the thumbnail's service ResourceMeta object.
- getResponse() : ResponseCacheItem
- checkMetadata() : ResponseCacheItem|null
- generateThumbnail() : void
- getStatistics() : array{0: int, 1: int}
- getThumbnailPath() : string
- Returns expected cached file location (doesn't assure such a file exists).
- runGltf() : array<string|int, string>
- simplify() : void
Constants
DEFAULT_MAX_FILE_SIZE_MB
public
mixed
DEFAULT_MAX_FILE_SIZE_MB
= 1000
DEFAULT_MIN_FILE_SIZE_MB
public
mixed
DEFAULT_MIN_FILE_SIZE_MB
= 50
MIME
public
mixed
MIME
= 'model/gltf-binary'
Properties
$config
private
object
$config
$log
private
LoggerInterface|null
$log
$meta
private
DatasetNodeInterface
$meta
$url
private
string
$url
Methods
__construct()
public
__construct(DatasetNodeInterface $meta, object $config, LoggerInterface|null $log) : mixed
Parameters
- $meta : DatasetNodeInterface
- $config : object
- $log : LoggerInterface|null
cacheHandler()
Gets the requested repository resource metadata and converts it to the thumbnail's service ResourceMeta object.
public
static cacheHandler(RepoResourceInterface $res, array<string|int, mixed> $param, object $config[, LoggerInterface|null $log = null ]) : ResponseCacheItem
Parameters
- $res : RepoResourceInterface
- $param : array<string|int, mixed>
- $config : object
- $log : LoggerInterface|null = null
Return values
ResponseCacheItemgetResponse()
public
getResponse() : ResponseCacheItem
Return values
ResponseCacheItemcheckMetadata()
private
checkMetadata() : ResponseCacheItem|null
Return values
ResponseCacheItem|nullgenerateThumbnail()
private
generateThumbnail() : void
getStatistics()
private
getStatistics(string $path) : array{0: int, 1: int}
Parameters
- $path : string
Return values
array{0: int, 1: int}getThumbnailPath()
Returns expected cached file location (doesn't assure such a file exists).
private
getThumbnailPath() : string
Return values
stringrunGltf()
private
runGltf(array<string|int, string> $cmd, string $errorMsg) : array<string|int, string>
Parameters
- $cmd : array<string|int, string>
- $errorMsg : string
Return values
array<string|int, string>simplify()
private
simplify(string $inPath, string $outPath) : void
Parameters
- $inPath : string
- $outPath : string