intracto/lti-consumer-bundle
Composer 安装命令:
composer require intracto/lti-consumer-bundle
包简介
This bundle is a consumer setup for the LTI protocol
README 文档
README
This bundle can be used to establish LTI (version 1) connections to an e-learning tool provider.
How to install?
Install the bundle via composer
composer require intracto/lti-consumer-bundle
Enable the bundle
// app/AppKernel.php // ... class AppKernel extends Kernel { // ... public function registerBundles() { $bundles = array( // ..., new Intracto\LTIConsumerBundle\LTIConsumerBundle(), ); // ... } }
Routing:
intracto_lti_consumer_launch: path: /lti/launch defaults: { _controller: intracto.lti.controller:launchAction }
How to get started?
Fill in parameters.yml
# allows you to send custom parameters to the launch action and include them with the LTI request. intracto_lti.custom_parameters: aCustomParameterName: ltiFieldName intracto_lti.provider: keys: url: 'launch-url-toolprovider-connect' base_url: 'base-url-toolprovider-connect' key: key-provided-by-tool-provider secret: secret-provided-by-tool-provder parameters: lti_version: LTI-1p0 resource_link_id: ToolProvider resource_link_title: ToolProvider tool_consumer_info_version: '1.1' tool_consumer_instance_guid: your-instance-guid tool_consumer_instance_description: your-instance-name
Create action in Controller
public function openElearningAction($elearningId) { return $this->render( '@App/Elearning/e_learning.html.twig', [ 'tool_url' => $this->generateUrl( 'intracto_lti_consumer_launch', [ 'email' => $this->getUser()->getUsername(), 'aCustomParameterName' => $elearningId, // $elearningId will be sent with the LTI connection as 'ltiFieldName' because of intracto_lti.custom_parameters ] ) ] ); }
Create a template 'e_learning.html.twig'
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Elearning</title> </head> <body> <header class="e-learning"> <h1 class="e-learning__title">{{ 'e_learning.page_title'|trans }}</h1> </header> <iframe class="page" src="{{ tool_url }}" width="100%" height="100%" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> </body> </html>
Create a template 'app/Resources/LTIConsumerBundle/views/index.html.twig'
This template will be used by the bundle to do the connect-request and to load the LTI provider into an iframe in your application
{{ form(form,{'attr': {'id': 'lti_form'}}) }}
<p>{{ 'lti.launch.message'|trans }}</p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
(function($) {
$('#lti_form').submit();
})(jQuery);
</script>
intracto/lti-consumer-bundle 适用场景与选型建议
intracto/lti-consumer-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 843 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「consumer」 「software」 「LTI」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 intracto/lti-consumer-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 intracto/lti-consumer-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 intracto/lti-consumer-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Simple Kafka library
Pumukit Lms Bundle.
Consumer of sqs message
Simple queues implementation in PHP through database.
RabbitMQ to sql consumer, using doctrine/dbal and php-amqplib/rabbitmq-bundle
Laminas API Tools Client API Service Consumer
统计信息
- 总下载量: 843
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-05