3namespace ceLTIc\LTI\Content;
20 private $copyAdvice =
null;
27 private $expiresAt =
null;
47 $this->copyAdvice = $copyAdvice;
57 $this->expiresAt = $expiresAt;
67 $item = parent::toJsonldObject();
68 if (!is_null($this->copyAdvice)) {
69 $item->copyAdvice = $this->copyAdvice;
71 if (!empty($this->expiresAt)) {
72 $item->expiresAt = gmdate(
'Y-m-d\TH:i:s\Z', $this->expiresAt);
85 $item = parent::toJsonObject();
86 if (!empty($this->expiresAt)) {
87 $item->expiresAt = gmdate(
'Y-m-d\TH:i:s\Z', $this->expiresAt);
100 parent::fromJsonObject($item);
101 foreach (get_object_vars($item) as $name => $value) {
105 $this->{$name} = $item->{$name};
Class to represent a file content-item object.
__construct($placementAdvices=null, $id=null)
Class constructor.
toJsonObject()
Wrap the content items to form a complete value for the https://purl.imsglobal.org/spec/lti-dl/claim/...
fromJsonObject($item)
Extract content-item details from its JSON representation.
setCopyAdvice($copyAdvice)
Set copy advice for the content-item.
setExpiresAt($expiresAt)
Set expiry date/time for the content-item.
toJsonldObject()
Wrap the content item to form an item complying with the application/vnd.ims.lti.v1....
Class to represent a content-item object.
const TYPE_FILE
Type for file content-item.