定制 dansup/php-activitystreams 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dansup/php-activitystreams

Composer 安装命令:

composer require dansup/php-activitystreams

包简介

Activity Streams is a simple specification used to describe social actions around the web. http://activitystrea.ms

README 文档

README

A PHP implementation of the Activity Streams 2.0 specification

Software License Latest Version on Packagist Total Downloads

This package is in active development, this is not a complete implementation of ActivityStreams 2.0

A modern AS2 php library. At the moment, only the object model type is partially implemented. I look forward to getting this feature complete by the end of summer 2017.

Install

Via Composer

$ composer require dansup/php-activitystreams

Usage

Lets create a basic object model and echo the response to a json encoded string.

use Dansup\ActivityStreams\ServerFactory;

$item = ServerFactory::create('object');

$item->type('Note')
$item->id('http://example.org/note/123');
$item->name('Our Weather Is Fine');
$item->content('I feel that the weather is appropriate to our season and location.');
$item->attributedTo([
  'id' => 'http://joe.website.example/',
  'type' => 'Person',
  'name' => 'Joe Smith'
]);
$item->addField('url', 'http://example.org/permalink/123');

echo $item->get();

Result:

{
 "@context": "https:\/\/www.w3.org\/ns\/activitystreams",
 "type": "Note",
 "id": "http:\/\/example.org\/note\/123",
 "name": "Our Weather Is Fine",
 "attributedTo": {
     "id": "http:\/\/joe.website.example\/",
     "type": "Person",
     "name": "Joe Smith"
 },
 "content": "I feel that the weather is appropriate to our season and location.",
 "published": "2017-04-21T01:31:20+00:00",
 "url": "http:\/\/example.org\/permalink\/123"
}

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email danielsupernault@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固