定制 ubc/ltcommons 二次开发

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

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

ubc/ltcommons

最新稳定版本:0.1.1

Composer 安装命令:

composer require ubc/ltcommons

包简介

UBC LT Commons

README 文档

README

Build Status

Install

composer require ubc/ltcommons

Usage

Plain PHP

require 'vendor/autoload.php';

// Bootstrap the JMS custom annotations for Object to Json mapping
\Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace(
    'JMS\Serializer\Annotation',
    dirname(__FILE__).'/vendor/jms/serializer/src'
);

$base_url = 'http://sisapi.example.com';
$username = 'service_username';
$password = 'service_password';

$providerFactory = new DataProviderFactory();
$providerFactory->addProvider(new SISDataProvider(
    $base_url,
    new GuzzleClient(),
    new HttpBasic($username, $password),
    new JMSSerializer()
));
$service = new DepartmentCodeService($providerFactory);
$codes = $service->getDepartmentCodes();

$student = $service->getStudentById('12345678');

Using with Symfony 2

Please checkout LtCommons bundle

Run Tests

composer install
vendor/bin/phpunit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-15