harbor/action-responder

A Responder implementation for the ADR pattern.

dev-master 2014-05-15 19:33 UTC

This package is auto-updated.

Last update: 2024-04-17 07:38:46 UTC


README

Provides implementations of the Action and Responder layers of the ADR Pattern.

These are base classes, intended to be extended (in most situations).

Note: The Domain Layer of ADR is out of the scope of this package.

Action Example

This example uses a JsonAction which uses a JsonResponder.

<?php

namespace Blog\Api\Actions;

use Harbor\ActionResponder\JsonAction;

class BlogListAction extends JsonAction
{
    public function __invoke()
    {
        // Do something with your domain to get the Blog list

        $this->responder->articles = $articles;
        return $this->getResponse();
    }
}

Responder Example

Coming Soon...See Tests for now.