TermRecord final readonly class
Minn\Content\TermRecord · public/minn/src/Minn/Content/TermRecord.php · 88 lines · implements ArrayAccess
One term with its taxonomy row, read by name: $term->name, ->slug, ->taxonomy, ->parentId, ->count. The taxonomy and description are empty when the query that built the record did not select them. Array access is the migration bridge, read-only.
Constants and properties
| prop | readonly int $id | Promoted from the constructor. |
| prop | readonly string $name | Promoted from the constructor. |
| prop | readonly string $slug | Promoted from the constructor. |
| prop | readonly int $taxonomyId | Promoted from the constructor. |
| prop | readonly string $taxonomy | Promoted from the constructor. |
| prop | readonly string $description | Promoted from the constructor. |
| prop | readonly int $parentId | Promoted from the constructor. |
| prop | readonly int $count | Promoted from the constructor. |
| private | readonly array $row | Promoted from the constructor. |
Public
| new | __construct(int $id, string $name, string $slug, int $taxonomyId, string $taxonomy, string $description, int $parentId, int $count, array $row)# |
| |||
| static | fromRow(array $row): self# | A record from a joined terms row; a missing column reads as empty.
| |||
| static | fromRows(array $rows): array# | A record for every row, in order.
| |||
| method | row(): array# | The stored row, for the writers and shapers that still spell columns. | |||
| method | hasParent(): bool# | Whether the term sits under another. | |||
| method | column(string $name): mixed# | One stored column by its database name, or null. | |||
| method | offsetExists(mixed $offset): bool# | The migration bridge: the record answers to its column names the way the row did. | |||
| method | offsetGet(mixed $offset): mixed# | The migration bridge: one column by its stored name, or null. | |||
| method | offsetSet(mixed $offset, mixed $value): never# | Records are read-only; writes go through the repository. | |||
| method | offsetUnset(mixed $offset): never# | Records are read-only; writes go through the repository. |
Nothing matches.