Skip to content

Fitlet/json-response-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Json Response Wrapper

Build Status

Json Response Wrapper is a library which is responsible for wrapping PHP Slim Response to json standardized format.

Wrapping response

Wrapping process is described in example below.

public function testAction(Response $res, Request $req)
{
    $jsonResponse = JsonResponseFactory::success("test message", []);
    
    return JsonResponseWrapper::newInstance()
        ->withJsonResponse($jsonResponse)
        ->wrap($res);
}

About

Standarized JSON Response wrapper library built in PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages