Example #1
0
 /**
  * get all video support type, ex. array(1=>youtube, 2=>vimeo)
  * @param string $return_key choose: name or title
  * @return array [id=>name]
  * 
  */
 public static function getAllSupportTypes($return_key = 'title')
 {
     if (NULL === self::$_supportTypes) {
         self::$_supportTypes = array(1 => array('name' => 'youtube', 'title' => 'YouTube Video'), 2 => array('name' => 'vimeo', 'title' => 'Vimeo Video'), self::$_uploadedType => array('name' => 'uploaded', 'title' => 'Uploaded Video'), 4 => array('name' => 'dailymotion', 'title' => 'Dailymotion Video'), self::$_videoUrlType => array('name' => 'videoURL', 'title' => 'URL Video'), 6 => array('name' => 'embed', 'title' => 'Embed Video'));
     }
     $ret = array();
     foreach (self::$_supportTypes as $key => $row) {
         $ret[$key] = $row[$return_key];
     }
     return $ret;
 }