Actualización

This commit is contained in:
Xes
2025-04-10 12:36:07 +02:00
parent 1da7c3f3b9
commit 4aff98e77b
3147 changed files with 320647 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class ImsLtiServiceResponseFactory.
*/
class ImsLtiServiceResponseFactory
{
/**
* @param string $type
* @param mixed $bodyParam
*
* @return ImsLtiServiceResponse|null
*/
public static function create($type, ImsLtiServiceResponseStatus $statusInfo, $bodyParam = null)
{
switch ($type) {
case ImsLtiServiceResponse::TYPE_REPLACE:
return new ImsLtiServiceReplaceResponse($statusInfo, $bodyParam);
case ImsLtiServiceResponse::TYPE_READ:
return new ImsLtiServiceReadResponse($statusInfo, $bodyParam);
case ImsLtiServiceResponse::TYPE_DELETE:
return new ImsLtiServiceDeleteResponse($statusInfo, $bodyParam);
default:
return new ImsLtiServiceUnsupportedResponse($statusInfo, $type);
}
return null;
}
}