TopicRepository
in
Repository interface for topics.
Table of Contents
Methods
- all() : array<string|int, Topic>
- Retrieve all topics.
- create() : Topic
- Persist a new topic.
- findById() : Topic|null
- Find a topic by its identifier.
- update() : Topic
- Update an existing topic.
Methods
all()
Retrieve all topics.
public
all() : array<string|int, Topic>
Return values
array<string|int, Topic>create()
Persist a new topic.
public
create(Topic $topic) : Topic
Parameters
- $topic : Topic
Return values
TopicfindById()
Find a topic by its identifier.
public
findById(TopicId $id) : Topic|null
Parameters
- $id : TopicId
Return values
Topic|nullupdate()
Update an existing topic.
public
update(Topic $topic) : Topic
Parameters
- $topic : Topic