CommonGateway\CoreBundle\Service\CacheService

Service to call external sources.

This service provides a guzzle wrapper to work with sources in the common gateway.

Methods

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 Remov non-exisitng items from the cashe.
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.
removeEndpoint Removes an endpoint from the cache.
removeObject Removes an object from the cache.
removeSchema Removes an Schema from the cache.
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.

CacheService::__construct

Description

 __construct (void)

Parameters

This function has no parameters.

Return Values

void


CacheService::cacheEndpoint

Description

public cacheEndpoint (\Endpoint $endpoint)

Put a single endpoint into the cache.

Parameters

  • (\Endpoint) $endpoint

Return Values

\Endpoint


CacheService::cacheObject

Description

public cacheObject (\ObjectEntity $objectEntity)

Put a single object into the cache.

Parameters

  • (\ObjectEntity) $objectEntity

Return Values

\ObjectEntity


CacheService::cacheShema

Description

public cacheShema (\Entity $entity)

Put a single schema into the cache.

Parameters

  • (\Entity) $entity

Return Values

\Entity


CacheService::cleanup

Description

public cleanup (void)

Remov non-exisitng items from the cashe.

Parameters

This function has no parameters.

Return Values

void


CacheService::getEndpoint

Description

public getEndpoint (\Uuid $id)

Get a single endpoint from the cache.

Parameters

  • (\Uuid) $id

Return Values

array|null


CacheService::getEndpoints

Description

 getEndpoints (void)

Parameters

This function has no parameters.

Return Values

void


CacheService::getObject

Description

public getObject (string $id)

Get a single object from the cache.

Parameters

  • (string) $id

Return Values

array|null


CacheService::getSchema

Description

public getSchema (\Uuid $id)

Get a single schema from the cache.

Parameters

  • (\Uuid) $id

Return Values

array|null


CacheService::removeEndpoint

Description

public removeEndpoint (\Endpoint $endpoint)

Removes an endpoint from the cache.

Parameters

  • (\Endpoint) $endpoint

Return Values

void


CacheService::removeObject

Description

public removeObject (\ObjectEntity $objectEntity)

Removes an object from the cache.

Parameters

  • (\ObjectEntity) $objectEntity

Return Values

void


CacheService::removeSchema

Description

public removeSchema (\Entity $entity)

Removes an Schema from the cache.

Parameters

  • (\Entity) $entity

Return Values

void


CacheService::searchObjects

Description

public searchObjects (string $search, array $filter, array $entities)

Searches the object store for objects containing the search string.

Parameters

  • (string) $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


CacheService::setPagination

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


CacheService::setStyle

Description

public setStyle (\SymfonyStyle $io)

Set symfony style in order to output to the console.

Parameters

  • (\SymfonyStyle) $io

Return Values

self


CacheService::warmup

Description

public warmup (void)

Throws all available objects into the cache.

Parameters

This function has no parameters.

Return Values

void