當前位置: 首頁>>代碼示例>>PHP>>正文


PHP QtiComponent::getObject方法代碼示例

本文整理匯總了PHP中qtism\data\QtiComponent::getObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP QtiComponent::getObject方法的具體用法?PHP QtiComponent::getObject怎麽用?PHP QtiComponent::getObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qtism\data\QtiComponent的用法示例。


在下文中一共展示了QtiComponent::getObject方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: marshall

 /**
  * Marshall an PositionObjectInteraction object into a DOMElement object.
  * 
  * @param QtiComponent $component A PositionObjectInteraction object.
  * @return DOMElement The according DOMElement object.
  * @throws MarshallingException
  */
 protected function marshall(QtiComponent $component)
 {
     $element = self::getDOMCradle()->createElement('positionObjectInteraction');
     $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getObject())->marshall($component->getObject()));
     self::setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
     self::setDOMElementAttribute($element, 'maxChoices', $component->getMaxChoices());
     if ($component->hasMinChoices() === true) {
         self::setDOMElementAttribute($element, 'minChoices', $component->getMinChoices());
     }
     if ($component->hasCenterPoint() === true) {
         $centerPoint = $component->getCenterPoint();
         self::setDOMElementAttribute($element, 'centerPoint', $centerPoint->getX() . " " . $centerPoint->getY());
     }
     self::fillElement($element, $component);
     return $element;
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:23,代碼來源:PositionObjectInteractionMarshaller.php

示例2: marshall

 /**
  * Marshall an PositionObjectStage object into a DOMElement object.
  * 
  * @param QtiComponent $component A PositionObjectStage object.
  * @return DOMElement The according DOMElement object.
  * @throws MarshallingException
  */
 protected function marshall(QtiComponent $component)
 {
     $element = self::getDOMCradle()->createElement('positionObjectStage');
     $object = $component->getObject();
     $element->appendChild($this->getMarshallerFactory()->createMarshaller($object)->marshall($object));
     foreach ($component->getPositionObjectInteractions() as $interaction) {
         $element->appendChild($this->getMarshallerFactory()->createMarshaller($interaction)->marshall($interaction));
     }
     return $element;
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:17,代碼來源:PositionObjectStageMarshaller.php

示例3: getChildrenComponents

 /**
  * @see \qtism\data\storage\xml\marshalling\RecursiveMarshaller::getChildrenComponents()
  */
 protected function getChildrenComponents(QtiComponent $component)
 {
     if ($component instanceof SimpleInline) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof AtomicBlock) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Tr) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Td) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Th) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Caption) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Ul) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Ol) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Li) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Dl) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof DlElement) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Object) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Div) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof ItemBody) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Blockquote) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof SimpleChoice) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof SimpleAssociableChoice) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof SimpleMatchSet) {
         return $component->getSimpleAssociableChoices()->getArrayCopy();
     } elseif ($component instanceof GapText) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof GapImg) {
         return array($component->getObject());
     } elseif ($component instanceof ChoiceInteraction) {
         return $component->getSimpleChoices()->getArrayCopy();
     } elseif ($component instanceof OrderInteraction) {
         return $component->getSimpleChoices()->getArrayCopy();
     } elseif ($component instanceof AssociateInteraction) {
         return $component->getSimpleAssociableChoices()->getArrayCopy();
     } elseif ($component instanceof GapMatchInteraction) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof InlineChoiceInteraction) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof HotspotInteraction) {
         return $component->getHotspotChoices()->getArrayCopy();
     } elseif ($component instanceof GraphicAssociateInteraction) {
         return $component->getAssociableHotspots()->getArrayCopy();
     } elseif ($component instanceof InlineChoice) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof MatchInteraction) {
         return $component->getSimpleMatchSets()->getArrayCopy();
     } elseif ($component instanceof Prompt) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof FeedbackBlock) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof TemplateBlock) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof TemplateInline) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof Hottext) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof HottextInteraction) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof GraphicOrderInteraction) {
         return $component->getHotspotChoices()->getArrayCopy();
     } elseif ($component instanceof ModalFeedback) {
         return $component->getContent()->getArrayCopy();
     } elseif ($component instanceof InfoControl) {
         return $component->getContent()->getArrayCopy();
     }
 }
開發者ID:nagyist,項目名稱:qti-sdk,代碼行數:83,代碼來源:ContentMarshaller.php


注:本文中的qtism\data\QtiComponent::getObject方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。