-
Notifications
You must be signed in to change notification settings - Fork 1
CacheService
Service to call external sources.
This service provides a guzzle wrapper to work with sources in the common gateway.
Name | Description |
---|---|
__construct | |
cacheEndpoint | Put a single endpoint into the cache. |
cacheObject | Put a single object into the cache. |
cacheShema | Put a single schema into the cache. |
cleanup | Remove non-existing items from the cache. |
getEndpoint | Get a single endpoint from the cache. |
getEndpoints | |
getObject | Get a single object from the cache. |
getSchema | Get a single schema from the cache. |
handleResultPagination | Adds pagination variables to an array with the results we found with searchObjects(). |
removeEndpoint | Removes an endpoint from the cache. |
removeObject | Removes an object from the cache. |
removeSchema | Removes an Schema from the cache. |
retrieveObjectsFromCache | Retrieves objects from a cache collection. |
searchObjects | Searches the object store for objects containing the search string. |
setPagination | Decides the pagination values. |
setStyle | Set symfony style in order to output to the console. |
warmup | Throws all available objects into the cache. |
Description
__construct (void)
Parameters
This function has no parameters.
Return Values
void
Description
public cacheEndpoint (\Endpoint $endpoint)
Put a single endpoint into the cache.
Parameters
(\Endpoint) $endpoint
Return Values
\Endpoint
Description
public cacheObject (\ObjectEntity $objectEntity)
Put a single object into the cache.
Parameters
(\ObjectEntity) $objectEntity
Return Values
\ObjectEntity
Description
public cacheShema (\Entity $entity)
Put a single schema into the cache.
Parameters
(\Entity) $entity
Return Values
\Entity
Description
public cleanup (void)
Remove non-existing items from the cache.
Parameters
This function has no parameters.
Return Values
void
Description
public getEndpoint (\Uuid $identification)
Get a single endpoint from the cache.
Parameters
(\Uuid) $identification
Return Values
array|null
Description
getEndpoints (void)
Parameters
This function has no parameters.
Return Values
void
Description
public getObject (string $identification)
Get a single object from the cache.
Parameters
(string) $identification
Return Values
array|null
Description
public getSchema (\Uuid $identification)
Get a single schema from the cache.
Parameters
(\Uuid) $identification
Return Values
array|null
Description
public handleResultPagination (array $filter, array $results, int $total)
Adds pagination variables to an array with the results we found with searchObjects().
Parameters
(array) $filter
(array) $results
(int) $total
Return Values
array
the result with pagination.
Description
public removeEndpoint (\Endpoint $endpoint)
Removes an endpoint from the cache.
Parameters
(\Endpoint) $endpoint
Return Values
void
Description
public removeObject (\ObjectEntity $objectEntity)
Removes an object from the cache.
Parameters
(\ObjectEntity) $objectEntity
Return Values
void
Description
public removeSchema (\Entity $entity)
Removes an Schema from the cache.
Parameters
(\Entity) $entity
Return Values
void
Description
public retrieveObjectsFromCache (array $filter, array $options, array $completeFilter)
Retrieves objects from a cache collection.
Parameters
(array) $filter
(array) $options
(array) $completeFilter
Return Values
array|null
$this->handleResultPagination()
Description
public searchObjects (string|null $search, array $filter, array $entities)
Searches the object store for objects containing the search string.
Parameters
-
(string|null) $search
: a string to search for within the given context -
(array) $filter
: an array of dot.notation filters for wich to search with -
(array) $entities
: schemas to limit te search to
Return Values
array|null
Throws Exceptions
\Exception
Description
public setPagination (int $limit, int $start, array $filters)
Decides the pagination values.
Parameters
-
(int) $limit
: The resulting limit -
(int) $start
: The resulting start value -
(array) $filters
: The filters
Return Values
array
Description
public setStyle (\SymfonyStyle $style)
Set symfony style in order to output to the console.
Parameters
(\SymfonyStyle) $style
Return Values
self
Description
public warmup (void)
Throws all available objects into the cache.
Parameters
This function has no parameters.
Return Values
void