Skip to content

harborphp/action-responder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActionResponder

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.

About

Action and Responder implementations for the ADR Pattern.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages