klaaspoortinga / tin-can-report-library
此包已被废弃,不再维护。未建议替代包。
Tin Can Report Library
dev-master
2014-11-07 15:02 UTC
Requires
- rusticisoftware/tincan: ~0.0
Requires (Dev)
- phpdocumentor/phpdocumentor: 2.*
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2021-09-27 17:25:59 UTC
README
这是Tin Can Report Library的一个非常早期的草案。该库的目标是使查询和分析Tin Can语句变得简单。
入门
Tin Can Report Library可通过Composer获取。
php composer.phar require klaaspoortinga/tin-can-report-library:dev-master
安装包后,需要使用Composer自动加载器
require 'vendor/autoload.php';
使用以下方式连接到您的LRS
$lrs = new Report(); $lrs->connectLrs('lrs_endpoint','lrs_username','lrs_password');
获取统计数据就像这样简单
$response = $lrs->Statistics->pastMonth(); //Get monthly statistics $response = $lrs->Statistics->pastMonth()->filterActors(); //Retrieves amount of monthly actors
或者使用Analyse类获取建议或比较actor!
$response = $lrs->Analyse->getSuggestions(5); //Retrieves the 5 most popular activities $response = $lrs->Analyse->compareActors(array(actor1, actor2, ..)) //Retrieves the activities these actors have in common