Documentation

Resource
in package

Description of Resource

Tags
author

zozlak

Table of Contents

Constants

DEFAULT_MAX_FILE_SIZE_MB  = 1000
DEFAULT_MIN_FILE_SIZE_MB  = 50
MIME  = 'model/gltf-binary'

Properties

$config  : object
$log  : LoggerInterface|null
$meta  : DatasetNodeInterface
$url  : string

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

$meta

private DatasetNodeInterface $meta

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
ResponseCacheItem

generateThumbnail()

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
string

runGltf()

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

        
On this page

Search results