当前位置: 首页>>代码示例>>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;未经允许,请勿转载。