Skip to content

Latest commit

 

History

History
252 lines (125 loc) · 3.85 KB

File metadata and controls

252 lines (125 loc) · 3.85 KB

CommonGateway\CoreBundle\Service\GatewayResourceService

Methods

Name Description
__construct The constructor sets al needed variables.
findSourceForUrl Find a source that has 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.
getObject Get a object by identifier.
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::findSourceForUrl

Description

public findSourceForUrl (string $url, string $pluginName, string|null $endpoint)

Find a source that has a location that match the specified url.

Todo: we should use a mongoDB filter instead of this, sources should exist in MongoDB.
This function gets used in the CustomerInteractionBundle, Gateway->synchronizationService.

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.
  • (string|null) $endpoint : The resulting endpoint (the remainder of the path).

Return Values

\Source|null

The source found or 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::getObject

Description

public getObject (string $id)

Get a object by identifier.

Parameters

  • (string) $id : The id to look for.

Return Values

\ObjectEntity|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