mini\Table\Contracts\SetInterface abstract interface

Documentation

Interface for a set of values that supports membership testing

Used for IN clause support - allows efficient subqueries where the set can be either in-memory or backed by another table.

Sets always yield stdClass objects with named column properties:

// Single column set
foreach ($set as $member) {
    echo $member->status;  // e.g., 'active'
}

// Multi-column set (composite key)
foreach ($set as $member) {
    echo $member->org_id . ':' . $member->user_id;
}

Use getColumns() to discover the shape:

$cols = $set->getColumns();  // ['status' => ColumnDef, ...]
$names = array_keys($set->getColumns());  // ['status']

Inheritance

Implements: Traversable

Methods (2)

Get column definitions for this set

Check if a value exists in the set

Source

src/Table/Contracts/SetInterface.php:32-57