Documentation

Resolver
in package
implements ResolverInterface

Interfaces, Classes and Traits

ResolverInterface

Table of Contents

$datasources  : array<string|int, mixed>
All of the registered datasources.
$default  : string
The default datasource name.
__construct()  : void
Create a new datasource resolver instance.
addDatasource()  : void
Add a datasource to the resolver.
datasource()  : DatasourceInterface
Get a database datasource instance.
getDefaultDatasource()  : string
Get the default datasource name.
hasDatasource()  : bool
Check if a datasource has been registered.
setDefaultDatasource()  : void
Set the default datasource name.

Properties

$datasources

All of the registered datasources.

protected array<string|int, mixed> $datasources = []

$default

The default datasource name.

protected string $default

Methods

__construct()

Create a new datasource resolver instance.

public __construct([array<string|int, mixed> $datasources = [] ]) : void
Parameters
$datasources : array<string|int, mixed> = []
Return values
void

getDefaultDatasource()

Get the default datasource name.

public getDefaultDatasource() : string
Return values
string

hasDatasource()

Check if a datasource has been registered.

public hasDatasource(string $name) : bool
Parameters
$name : string
Return values
bool

setDefaultDatasource()

Set the default datasource name.

public setDefaultDatasource(string $name) : void
Parameters
$name : string
Return values
void

Search results