Пример #1
0
 /**
  * Extract parameters of special external references to parameter array
  */
 function extractUrlParameters()
 {
     include_once "./Services/MediaObjects/classes/class.ilExternalMediaAnalyzer.php";
     $par = ilExternalMediaAnalyzer::extractUrlParameters($this->getLocation(), $this->getParameters());
     foreach ($par as $k => $v) {
         $this->setParameter($k, $v);
     }
 }
 /**
  * Extract URL information to parameter array
  */
 static function extractUrlParameters($a_location, $a_parameter)
 {
     if (!is_array($a_parameter)) {
         $a_parameter = array();
     }
     $ext_par = array();
     // YouTube
     if (ilExternalMediaAnalyzer::isYouTube($a_location)) {
         $ext_par = ilExternalMediaAnalyzer::extractYouTubeParameters($a_location);
         $a_parameter = array();
     }
     // Flickr
     if (ilExternalMediaAnalyzer::isFlickr($a_location)) {
         $ext_par = ilExternalMediaAnalyzer::extractFlickrParameters($a_location);
         $a_parameter = array();
     }
     // GoogleVideo
     if (ilExternalMediaAnalyzer::isGoogleVideo($a_location)) {
         $ext_par = ilExternalMediaAnalyzer::extractGoogleVideoParameters($a_location);
         $a_parameter = array();
     }
     // GoogleDocs
     if (ilExternalMediaAnalyzer::isGoogleDocument($a_location)) {
         $ext_par = ilExternalMediaAnalyzer::extractGoogleDocumentParameters($a_location);
         $a_parameter = array();
     }
     foreach ($ext_par as $name => $value) {
         $a_parameter[$name] = $value;
     }
     return $a_parameter;
 }