Documentation

DatabasePresenceVerifier
in package
implements PresenceVerifierInterface

Interfaces, Classes and Traits

PresenceVerifierInterface

Table of Contents

$connection  : string
The database connection to use.
$db  : ConnectionResolverInterface
The database connection instance.
__construct()  : void
Create a new database presence verifier.
getCount()  : int
Count the number of objects in a collection having the given value.
getMultiCount()  : int
Count the number of objects in a collection with the given values.
setConnection()  : void
Set the connection to be used.
addConditions()  : Builder
Add the given conditions to the query.
addWhere()  : void
Add a "where" clause to the given query.
table()  : Builder
Get a query builder for the given table.

Properties

Methods

getCount()

Count the number of objects in a collection having the given value.

public getCount(string $collection, string $column, string $value[, int|null $excludeId = null ][, string|null $idColumn = null ][, array<string|int, mixed> $extra = [] ]) : int
Parameters
$collection : string
$column : string
$value : string
$excludeId : int|null = null
$idColumn : string|null = null
$extra : array<string|int, mixed> = []
Return values
int

getMultiCount()

Count the number of objects in a collection with the given values.

public getMultiCount(string $collection, string $column, array<string|int, mixed> $values[, array<string|int, mixed> $extra = [] ]) : int
Parameters
$collection : string
$column : string
$values : array<string|int, mixed>
$extra : array<string|int, mixed> = []
Return values
int

setConnection()

Set the connection to be used.

public setConnection(string $connection) : void
Parameters
$connection : string
Return values
void

addWhere()

Add a "where" clause to the given query.

protected addWhere(Builder $query, string $key, string $extraValue) : void
Parameters
$query : Builder
$key : string
$extraValue : string
Return values
void

Search results