Neuron-PHP

IEventRegistrationRepository

Repository interface for EventRegistration entities.

Table of Contents

Methods

countByEvent()  : int
Count registrations for an event.
create()  : EventRegistration
Persist a registration and return it with its new id.
delete()  : bool
Delete a registration by id.
existsForEmail()  : bool
Determine whether an email is already registered for an event (active registrations only).
findById()  : EventRegistration|null
Find a registration by id.
getByEvent()  : array<string|int, EventRegistration>
Get all registrations for an event, newest first.
paginate()  : EventRegistration[], total: int, page: int, per_page: int, pages: int}
Return a page of registrations, newest first, optionally filtered by event.

Methods

countByEvent()

Count registrations for an event.

public countByEvent(int $eventId) : int
Parameters
$eventId : int
Return values
int

existsForEmail()

Determine whether an email is already registered for an event (active registrations only).

public existsForEmail(int $eventId, string $email) : bool
Parameters
$eventId : int
$email : string
Return values
bool

paginate()

Return a page of registrations, newest first, optionally filtered by event.

public paginate([int $page = 1 ][, int $perPage = 25 ][, int|null $eventId = null ]) : EventRegistration[], total: int, page: int, per_page: int, pages: int}
Parameters
$page : int = 1

Page number (1-based)

$perPage : int = 25

Items per page

$eventId : int|null = null

Optional event filter

Return values
EventRegistration[], total: int, page: int, per_page: int, pages: int}
On this page

Search results