mini\Table\Utility\EmptyTable final class

Documentation

Empty table with schema

Represents an empty result while preserving schema information. All filter operations return $this since filtering an empty set yields an empty set.

new EmptyTable(new ColumnDef('id'), new ColumnDef('name'))
EmptyTable::from($table)  // Empty result with $table's schema

Inheritance

Extends: mini\Table\AbstractTable

Implements: mini\Table\Contracts\SetInterface IteratorAggregate Countable Traversable mini\Table\Contracts\TableInterface

Uses Traits: mini\Table\Utility\TablePropertiesTrait

Properties (4)

protected ?Closure $compareFn
protected ?int $limit
protected int $offset
private array $props

Methods (36)

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Hook for subclasses to customize clone behavior

Get column name(s) that the row key represents

Get the string comparison function for sorting

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Documentation missing

Get the current table alias (null if not set)

Documentation missing

Documentation missing

Documentation missing

Get the primary key column definition (cached)

Iterate over rows with visible columns only

Get columns available for output

Get all column definitions regardless of projection

Narrow to specific columns

Load a single row by its row ID

Get a property value

Check if a property exists (including null values)

Return table with property set

Source

src/Table/Utility/EmptyTable.php:24-104