public function load()
    {
        $returnValue = array();

    	//load it using the SimpleXml library
        $xml = false;
    	switch($this->sourceType){
    	    
    		case self::SOURCE_FILE:
    		    $xml = simplexml_load_file($this->source);
    		break;
    		
    		case self::SOURCE_URL:
    			$xmlContent = tao_helpers_Request::load($this->source, true);
    			$xml = simplexml_load_string($xmlContent);
    		break;
    		
    		case self::SOURCE_STRING:
    			$xml = simplexml_load_string($this->source);
    		break;
    	}
    	
    	if ($xml !== false) {
    		
    		//get the QTI Item's resources from the imsmanifest.xml
    		$returnValue = ManifestParserFactory::getResourcesFromManifest($xml);
    		
    		if (!$this->valid) {
    			$this->valid = true;
    			libxml_clear_errors();
    		}
    	}
    	else if (!$this->valid) {
    		$this->addErrors(libxml_get_errors());
    		libxml_clear_errors();
    	}
        
        return (array) $returnValue;
    }
public function load()
    {
        $returnValue = array();

    	//load it using the SimpleXml library
        $xml = false;
    	switch($this->sourceType){
    	    
    		case self::SOURCE_FILE:
    		    $xml = simplexml_load_file($this->source);
    		break;
    		
    		case self::SOURCE_URL:
    			$xmlContent = tao_helpers_Request::load($this->source, true);
    			$xml = simplexml_load_string($xmlContent);
    		break;
    		
    		case self::SOURCE_STRING:
    			$xml = simplexml_load_string($this->source);
    		break;
    	}
    	
    	if ($xml !== false) {
    		
    		//get the QTI Item's resources from the imsmanifest.xml
    		$returnValue = ManifestParserFactory::getResourcesFromManifest($xml);
    		
    		if (!$this->valid) {
    			$this->valid = true;
    			libxml_clear_errors();
    		}
    	}
    	else if (!$this->valid) {
    		$this->addErrors(libxml_get_errors());
    		libxml_clear_errors();
    	}
        
        return (array) $returnValue;
    }
public function load ( ) { $ returnValue = array ( ) ; //load it using the SimpleXml library $ xml = false ; switch ( $ this -> sourceType ) { case self :: SOURCE_FILE : $ xml = simplexml_load_file ( $ this -> source ) ; break ; case self :: SOURCE_URL : $ xmlContent = tao_helpers_Request :: load ( $ this -> source , true ) ; $ xml = simplexml_load_string ( $ xmlContent ) ; break ; case self :: SOURCE_STRING : $ xml = simplexml_load_string ( $ this -> source ) ; break ; } if ( $ xml !== false ) { //get the QTI Item's resources from the imsmanifest.xml $ returnValue = ManifestParserFactory :: getResourcesFromManifest ( $ xml ) ; if ( ! $ this -> valid ) { $ this -> valid = true ; libxml_clear_errors ( ) ; } } else if ( ! $ this -> valid ) { $ this -> addErrors ( libxml_get_errors ( ) ) ; libxml_clear_errors ( ) ; } return ( array ) $ returnValue ; }
Extract the resources informations about the items
and build a list a QTI_Resource

@access public
@return array
Extract the resources informations about the items and build a list a QTI_Resource