jefersondaniel/siren-php
Composer 安装命令:
composer require jefersondaniel/siren-php
包简介
Siren hypermedia type implementation for PHP
关键字:
README 文档
README
Siren hypermedia type implementation for PHP
Introduction
Siren is a hypermedia specification for representing entities. As HTML is used for visually representing documents on a Web site, Siren is a specification for presenting entities via a Web API. Siren offers structures to communicate information about entities, actions for executing state transitions, and links for client navigation.
Installing with composer
composer.phar require jefersondaniel/siren-php
Encoding a resource
$collection = new SirenPHP\Entity( '/collection/1', ['count' => 3], ['collection'] ); $entity = new SirenPHP\Entity( '/book/1', ['name' => 'The Book 1'], ['book'] ); $collection->appendEntity(['item'], $entity); $link = new SirenPHP\Link(['next'], '/collection/2'); $collection->appendLink($link); echo (string) $collection;
统计信息
- 总下载量: 557
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-06-16