public function get_extension(moodle_url $url) {
        // Note: Does not use core_text (. is UTF8-safe).
        $filename = self::get_filename($url);
        $dot = strrpos($filename, '.');
        if ($dot === false) {
            return '';
        } else {
            return strtolower(substr($filename, $dot + 1));
        }
    }
public function get_extension(moodle_url $url) {
        // Note: Does not use core_text (. is UTF8-safe).
        $filename = self::get_filename($url);
        $dot = strrpos($filename, '.');
        if ($dot === false) {
            return '';
        } else {
            return strtolower(substr($filename, $dot + 1));
        }
    }
public function get_extension ( moodle_url $ url ) { // Note: Does not use core_text (. is UTF8-safe). $ filename = self :: get_filename ( $ url ) ; $ dot = strrpos ( $ filename , '.' ) ; if ( $ dot === false ) { return '' ; } else { return strtolower ( substr ( $ filename , $ dot + 1 ) ) ; } }
Returns the file extension for a URL.
@param moodle_url $url URL
Returns the file extension for a URL .