Actions
Actions encapsulate focused logic inside Services.
Actions are handler classes (or function helpers) that perform work and often render a Container. They live in actions/.
Class-Based Action
class apihome extends JX_Action implements JX_ActionI
{
public function getAction()
{
include "containers/api/api.php";
}
}
Place the file in actions/apihome.php and invoke it from a Service.
Invocation Example
$action = new apihome();
$action->getAction();
Actions can return data or directly include Containers. API resources can also implement getApi() for JSON responses.
Usage Patterns
Most Actions are class-based. API routes like /api/v1/apihome resolve to an Action class and call getApi() when present.
Container-Friendly
Actions make it easy to gather data and render a view within a Service flow.