Neuron-PHP

DatabaseEventCategoryRepository
in package
implements IEventCategoryRepository

Database-backed event category repository.

Works with SQLite, MySQL, and PostgreSQL.

Table of Contents

Interfaces

IEventCategoryRepository
Repository interface for EventCategory entities.

Properties

$_pdo  : PDO

Methods

__construct()  : mixed
Constructor
all()  : array<string|int, EventCategory>
Get all event categories
create()  : EventCategory
Create new category
delete()  : bool
Delete category
findById()  : EventCategory|null
Find category by ID
findByIds()  : array<string|int, EventCategory>
Find categories by IDs
findBySlug()  : EventCategory|null
Find category by slug
slugExists()  : bool
Check if category slug exists
update()  : EventCategory
Update category

Properties

Methods

slugExists()

Check if category slug exists

public slugExists(string $slug[, int|null $excludeId = null ]) : bool
Parameters
$slug : string
$excludeId : int|null = null
Return values
bool

        
On this page

Search results