我正在尝试使用TinCanPHP查询存储在Learning Locker中的语句,但我想只检索在特定时间间隔内生成的语句。例如,我想要今天生成的所有语句。
我该怎么做?
答案 0 :(得分:1)
试试这个:
$LRSResponse = $LRS->queryStatements(['since' => '2016-11-15', 'ascending' => false]); // change to 'true', or omit, for ascending dates
$StatementsResult = $LRSResponse->content;
$array_of_Statement_objects = $StatementsResult->getStatements();
foreach ($array_of_Statement_objects as $extracted_Statement_object){
// deal with statements as necessary
}
unset($extracted_Statement_object);