/** * Insert video for derived type. * @param array $data * @param array $gtypes * @param array $options * @return int */ private static function insert_video_type(array $data, $gtypes, $options = array()) { if (count($gtypes) > 0) { $gtype = $gtypes[0]; switch ($gtype) { case 'tvshow': return TVShow_Episode::insert($data, $gtypes, $options); case 'movie': return Movie::insert($data, $gtypes, $options); case 'clip': return Clip::insert($data, $gtypes, $options); case 'personal_video': return Personal_Video::insert($data, $gtypes, $options); default: // Do nothing, video entry already created and no additional data for now break; } } return $data['id']; }