public static function get_url_id($url)
    {
        $service = self::identify_service($url);
        //TODO use a function for this, it is duplicated
        if ($service == self::YOUTUBE) {
            return self::get_youtube_id($url);
        } elseif ($service == self::VIMEO) {
            return self::get_vimeo_id($url);
        } elseif ($service == self::TWENTYTHREE) {
            return self::get_vimeo_id($url);
        }
        return null;
    }
public static function get_url_id($url)
    {
        $service = self::identify_service($url);
        //TODO use a function for this, it is duplicated
        if ($service == self::YOUTUBE) {
            return self::get_youtube_id($url);
        } elseif ($service == self::VIMEO) {
            return self::get_vimeo_id($url);
        } elseif ($service == self::TWENTYTHREE) {
            return self::get_vimeo_id($url);
        }
        return null;
    }
public static function get_url_id ( $ url ) { $ service = self :: identify_service ( $ url ) ; //TODO use a function for this, it is duplicated if ( $ service == self :: YOUTUBE ) { return self :: get_youtube_id ( $ url ) ; } elseif ( $ service == self :: VIMEO ) { return self :: get_vimeo_id ( $ url ) ; } elseif ( $ service == self :: TWENTYTHREE ) { return self :: get_vimeo_id ( $ url ) ; } return null ; }
Determines which cloud video provider is being used based on the passed url,
and extracts the video id from the url.

@param string $url The url
@return null|string Null on failure, the video's id on success
Determines which cloud video provider is being used based on the passed url and extracts the video id from the url .