CommonGateway\CoreBundle\Service\GatewayResourceService

Methods

Name Description
__construct The constructor sets al needed variables.
findSourcesForUrl Find all sources that have a location that match the specified url.
getAction Get an action by reference.
getEndpoint Get a endpoint by reference.
getMapping Get a mapping by reference.
getSchema Get a schema by reference.
getSource Get a source by reference.

GatewayResourceService::__construct

Description

public __construct (\EntityManagerInterface $entityManager, \LoggerInterface $pluginLogger)

The constructor sets al needed variables.

Parameters

  • (\EntityManagerInterface) $entityManager
  • (\LoggerInterface) $pluginLogger

Return Values

void


GatewayResourceService::findSourcesForUrl

Description

public findSourcesForUrl (string $url, string $pluginName)

Find all sources that have a location that match the specified url.

Todo: we should use a mongoDB filter instead of this, sources should exist in MongoDB.

Parameters

  • (string) $url : The url we are trying to find a matching source for.
  • (string) $pluginName : The name of the plugin that requests these resources.

Return Values

array|null


GatewayResourceService::getAction

Description

public getAction (string $reference, string $pluginName)

Get an action by reference.

Parameters

  • (string) $reference : The reference to look for
  • (string) $pluginName : The name of the plugin that requests the resource.

Return Values

\Action|null


GatewayResourceService::getEndpoint

Description

public getEndpoint (string $reference, string $pluginName)

Get a endpoint by reference.

Parameters

  • (string) $reference : The location to look for.
  • (string) $pluginName : The name of the plugin that requests the resource.

Return Values

\Endpoint|null


GatewayResourceService::getMapping

Description

public getMapping (string $reference, string $pluginName)

Get a mapping by reference.

Parameters

  • (string) $reference : The reference to look for.
  • (string) $pluginName : The name of the plugin that requests the resource.

Return Values

\Mapping|null


GatewayResourceService::getSchema

Description

public getSchema (string $reference, string $pluginName)

Get a schema by reference.

Parameters

  • (string) $reference : The reference to look for.
  • (string) $pluginName : The name of the plugin that requests the resource.

Return Values

\Entity|null


GatewayResourceService::getSource

Description

public getSource (string $reference, string $pluginName)

Get a source by reference.

Parameters

  • (string) $reference : The reference to look for.
  • (string) $pluginName : The name of the plugin that requests the resource.

Return Values

\Source|null