interface item_service_interface

Public API Contract for item_service.

Extensions MUST depend on this interface instead of the concrete application service inside the Core.

Methods

create(item_dto_interface $dto)

Create a new item.

update(item_dto_interface $dto)

Update an existing item.

void
delete(int $id)

Delete an item by its ID.

item_interface|null
find(int $id)

Find an item by ID.

array
get_metadata(int $id)

Retrieve metadata for an item.

array
find_by_type(string $type)

Retrieve all items of a given TYPE.

get_repository()

Get the underlying repository instance.

Details

at line 39
item_interface create(item_dto_interface $dto)

Create a new item.

Parameters

item_dto_interface $dto

Return Value

item_interface

at line 48
item_interface update(item_dto_interface $dto)

Update an existing item.

Parameters

item_dto_interface $dto

Return Value

item_interface

at line 55
void delete(int $id)

Delete an item by its ID.

Parameters

int $id

Return Value

void

at line 64
item_interface|null find(int $id)

Find an item by ID.

Parameters

int $id

Return Value

item_interface|null

at line 73
array get_metadata(int $id)

Retrieve metadata for an item.

Parameters

int $id

Return Value

array

at line 82
array find_by_type(string $type)

Retrieve all items of a given TYPE.

Parameters

string $type

Return Value

array

at line 90
item_repository_interface get_repository()

Get the underlying repository instance.

Use with caution; prefer service methods.