protected function marshallComplex(QtiDatatype $complex)
    {
        if ($complex instanceof QtiPoint) {
            return $this->marshallPoint($complex);
        } elseif ($complex instanceof QtiDirectedPair) {
            return $this->marshallDirectedPair($complex);
        } elseif ($complex instanceof QtiPair) {
            return $this->marshallPair($complex);
        } elseif ($complex instanceof QtiDuration) {
            return $this->marshallDuration($complex);
        } elseif ($complex instanceof QtiFile) {
            return $this->marshallFile($complex);
        }
    }
protected function marshallComplex(QtiDatatype $complex)
    {
        if ($complex instanceof QtiPoint) {
            return $this->marshallPoint($complex);
        } elseif ($complex instanceof QtiDirectedPair) {
            return $this->marshallDirectedPair($complex);
        } elseif ($complex instanceof QtiPair) {
            return $this->marshallPair($complex);
        } elseif ($complex instanceof QtiDuration) {
            return $this->marshallDuration($complex);
        } elseif ($complex instanceof QtiFile) {
            return $this->marshallFile($complex);
        }
    }
protected function marshallComplex ( QtiDatatype $ complex ) { if ( $ complex instanceof QtiPoint ) { return $ this -> marshallPoint ( $ complex ) ; } elseif ( $ complex instanceof QtiDirectedPair ) { return $ this -> marshallDirectedPair ( $ complex ) ; } elseif ( $ complex instanceof QtiPair ) { return $ this -> marshallPair ( $ complex ) ; } elseif ( $ complex instanceof QtiDuration ) { return $ this -> marshallDuration ( $ complex ) ; } elseif ( $ complex instanceof QtiFile ) { return $ this -> marshallFile ( $ complex ) ; } }
Marshall a single complex QtiDataType object.

@param \qtism\common\datatypes\QtiDatatype $complex
@throws \qtism\runtime\pci\json\MarshallingException
@return array An array representing the JSON data to be encoded later on.
Marshall a single complex QtiDataType object .