Bristol SU Support Package
Public Member Functions | List of all members
BristolSU\Support\Connection\Contracts\ConnectionRepository Interface Reference
Inheritance diagram for BristolSU\Support\Connection\Contracts\ConnectionRepository:
Inheritance graph
[legend]

Public Member Functions

 all ()
 
 get (int $id)
 
 delete (int $id)
 
 create (array $attributes)
 
 update (int $id, array $attributes)
 
 getAllForService (string $service)
 
 getAllForConnector (string $alias)
 

Detailed Description

Handle getting and creating connections (instances of a connector)

Definition at line 10 of file ConnectionRepository.php.

Member Function Documentation

◆ all()

BristolSU\Support\Connection\Contracts\ConnectionRepository::all ( )

Return all connections

Returns
Connection[]

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ create()

BristolSU\Support\Connection\Contracts\ConnectionRepository::create ( array  $attributes)

Create a connection

Attributes should contain [ 'name' => 'Connection Name', 'description' => 'Connection Description', 'alias' => 'connector_alias', 'settings' => [ 'api_key' => 'abc123', ... ] ] The settings are the settings specific to the connector being used.

Parameters
array$attributesAttributes to make the connection
Returns
Connection New connection

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ delete()

BristolSU\Support\Connection\Contracts\ConnectionRepository::delete ( int  $id)

Delete a connection

Parameters
int$idID of the connection to delete
Returns
void

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ get()

BristolSU\Support\Connection\Contracts\ConnectionRepository::get ( int  $id)

Get a connection by ID

Parameters
int$idID of the connection
Returns
Connection

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ getAllForConnector()

BristolSU\Support\Connection\Contracts\ConnectionRepository::getAllForConnector ( string  $alias)

Get all connections for a specific connector

Parameters
string$aliasConnector to return connections for
Returns
Connection[]

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ getAllForService()

BristolSU\Support\Connection\Contracts\ConnectionRepository::getAllForService ( string  $service)

Get all connections for a service. These may be from multiple connectors.

Parameters
string$serviceService to get the connections for
Returns
Connection[]

Implemented in BristolSU\Support\Connection\ConnectionRepository.

◆ update()

BristolSU\Support\Connection\Contracts\ConnectionRepository::update ( int  $id,
array  $attributes 
)

Update a connection

Attributes can contain [ 'name' => 'Connection Name', 'description' => 'Connection Description', 'alias' => 'connector_alias', 'settings' => [ 'api_key' => 'abc123', ... ] ]

Parameters
int$idID of the connection to update
array$attributesAttributes to change
Returns
Connection Edited connection

Implemented in BristolSU\Support\Connection\ConnectionRepository.


The documentation for this interface was generated from the following file: