Expose
- Full name:
\Zemit\Mvc\Controller\Traits\Expose
Methods
expose
Expose properties of an item
public expose(mixed $item, array|null $expose = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$item | mixed | The item to expose properties for |
$expose | **array | null** |
Return Value:
The exposed properties as an array
listExpose
List entities with specified expose definition
public listExpose(iterable $items, array|null $expose = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$items | iterable | The iterable collection of items to be listed |
$expose | **array | null** |
Return Value:
The array of exposed entities
exportExpose
Export items with expose definition
public exportExpose(iterable $items, array|null $expose = null): array
Parameters:
Parameter | Type | Description |
---|---|---|
$items | iterable | The items to be exported |
$expose | **array | null** |
Return Value:
The exported items