承接 tacit/client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

tacit/client

Composer 安装命令:

composer require tacit/client

包简介

An API Client library for Tacit APIs

关键字:

README 文档

README

The Tacit Client project is a library for using RESTful APIs created with Tacit within a Slim web application.

Installation

Use composer to require the tacit\client project.

user@host:~$ composer require "tacit/client dev-master"

Usage

In your gateway PHP file for the application, add the Identities provider and API Client as singletons to the DI container:

$app->container->singleton('identities', function() use ($app) {
    return (new \Tacit\Client\Identity($app->config('api.identities')));
});

$app->container->singleton('api', function() use ($app) {
    return (new \Tacit\Client($app, $app->config('api.endpoint')));
});

Then add the Session Middleware to the application:

session_name($app->config('session.name'));
session_set_cookie_params(
    (integer)$app->config('session.lifetime'),
    rtrim($app->request->getRootUri(), '/') . '/'
);

$app->add(new \Tacit\Middleware\Session());

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-01