protected function getExtension($file)
    {
        if (strpos($file, '.') !== false) {
            $tempExt = strtolower(substr($file, strrpos($file, '.') + 1, strlen($file) - strrpos($file, '.')));
            return strtolower(trim($tempExt,'/'));
        }
        return '';
    }
protected function getExtension($file)
    {
        if (strpos($file, '.') !== false) {
            $tempExt = strtolower(substr($file, strrpos($file, '.') + 1, strlen($file) - strrpos($file, '.')));
            return strtolower(trim($tempExt,'/'));
        }
        return '';
    }
protected function getExtension ( $ file ) { if ( strpos ( $ file , '.' ) !== false ) { $ tempExt = strtolower ( substr ( $ file , strrpos ( $ file , '.' ) + 1 , strlen ( $ file ) - strrpos ( $ file , '.' ) ) ) ; return strtolower ( trim ( $ tempExt , '/' ) ) ; } return '' ; }
Returns the extension of a file, lowercase

@param  string  $file
@return string
Returns the extension of a file lowercase