Giter Site home page Giter Site logo

weierophinney / hal Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 5.0 739 KB

ABANDONED; use zendframework/zend-expressive-hal instead.

Home Page: https://docs.zendframework.com/zend-expressive-hal/

License: BSD 2-Clause "Simplified" License

PHP 100.00%
hal rest psr-7 psr-11 psr-13 middleware

hal's Introduction

Hypertext Application Language (HAL) for PSR-7 Applications

ABANDONED

Please use the package zendframework/zend-expressive-hal instead, as development has moved to that repository.

Build Status Coverage Status

This library provides provides utilities for modeling HAL resources with links and generating PSR-7 responses representing both JSON and XML serializations of them.

Installation

Run the following to install this library:

$ composer require weierophinney/hal

Documentation

Documentation is in the doc tree, and can be compiled using mkdocs:

$ mkdocs build

You may also browse the documentation online.

hal's People

Contributors

sasezaki avatar weierophinney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hal's Issues

Provide a simpler way to use custom extractors

As far as I understood the code, the way to provide a custom extractor is to register it among the hydrators.

Could it be an idea to allow the extractor parameter in the ResourceMetadata classes to be an object, and not only a string, to allow users to pass directly an instance of ExtractionInterface?

Make `$hydrators` optional in `ResourceGenerator` class

If I am not wrong, the $hydrators parameter of the ResourceGenerator class is used only in the ExtractInstance trait, which is not used if only the ResourceGenerator::fromArray method is called.

This suggests that $hydrators may be optional.

The method ResourceGenerator::getHydrators() could have ?ContainerInterface return type and a check could be added in ExtractInstance trait, throwing an exception if $hydrators is null.

Moreover, if #7 makes sense, using hydrators may not be needed even when using fromObject.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.