UserRecord final readonly class
Minn\Content\UserRecord · public/minn/src/Minn/Content/UserRecord.php · 96 lines · implements ArrayAccess
One row of the users table, read by name. Columns keep their WordPress spelling in row(); here they are $user->login, ->email, ->displayName. Array access is the migration bridge, read-only; new code reads the properties.
Used by 18 (show)
Constants and properties
| prop | readonly int $id | Promoted from the constructor. |
| prop | readonly string $login | Promoted from the constructor. |
| prop | readonly string $passwordHash | Promoted from the constructor. |
| prop | readonly string $nicename | Promoted from the constructor. |
| prop | readonly string $email | Promoted from the constructor. |
| prop | readonly string $url | Promoted from the constructor. |
| prop | readonly string $registered | Promoted from the constructor. |
| prop | readonly string $activationKey | Promoted from the constructor. |
| prop | readonly int $status | Promoted from the constructor. |
| prop | readonly string $displayName | Promoted from the constructor. |
| private | readonly array $row | Promoted from the constructor. |
Public
| new | __construct(int $id, string $login, string $passwordHash, string $nicename, string $email, string $url, string $registered, string $activationKey, int $status, string $displayName, array $row)# |
| |||
| static | fromRow(array $row): self# | A record from a users 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. The row as the table holds it. | |||
| method | name(): string# | The name shown for this person: the display name, or the login when none was set. | |||
| 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.