* */ class taoQtiCommon_helpers_PciStateOutput extends taoQtiCommon_helpers_AbstractStateOutput { /** * Create a new taoQtiCommon_helpers_PciStateOutput. * */ public function __construct() { parent::__construct(); } /** * Add a variable to be transformed into its IMS PCI JSON Representation * for a later output. * * @param Variable $variable */ public function addVariable(Variable $variable) { $output = &$this->getOutput(); $varName = $variable->getIdentifier(); $marshaller = new taoQtiCommon_helpers_PciJsonMarshaller(); $output[$varName] = $marshaller->marshall($variable->getValue(), taoQtiCommon_helpers_PciJsonMarshaller::MARSHALL_ARRAY); } }