ResolverInterface

The resolver interface defines the methods required for resolving Halcyon datasources.

 interface Winter\Storm\Halcyon\Datasource\ResolverInterface

Methods

public addDatasource (string $name, Winter\Storm\Halcyon\Datasource\DatasourceInterface $datasource) : void

Adds a datasource to the resolver.

Parameters
Property Description
$name
string
$datasource
Winter\Storm\Halcyon\Datasource\DatasourceInterface
Returns
void

public datasource ($name = null) : Winter\Storm\Halcyon\Datasource\DatasourceInterface

Get a datasource instance by name.

Parameters
Property Description
$name
mixed
Returns
Winter\Storm\Halcyon\Datasource\DatasourceInterface

public getDefaultDatasource () : string | null

Gets the default datasource name.

Returns
string | null

public hasDatasource (string $name) : bool

Returns if the given datasource name exists.

Parameters
Property Description
$name
string
Returns
bool

public setDefaultDatasource (string $name) : void

Sets the default datasource name.

Parameters
Property Description
$name
string
Returns
void
Copyright © 2024 Winter CMS