original_string: public static function getTypeFromPath($file_name){
  		$ext = strtolower(preg_replace('/^.*\.([^.]+)$/', '$1', $file_name));
  		switch( $ext ){
  			case 'jpeg':
  			case 'jpg':
  				return self::JPEG;
  				break;
  			case 'otf':
  				return self::OpenType;
  				break;
  			case 'opf':
  				return self::OPF2;
  				break;
  			case 'smil':
  				return self::MediaOverlays301;
  				break;
  			case 'js':
  				return self::JS;
  				break;
  			default:
  				$const_name = strtoupper($ext);
  				$refl = new \ReflectionClass(get_called_class());
  				return $refl->getConstant($const_name);
  				break;
  		}
  	}
code: public static function getTypeFromPath($file_name){
  		$ext = strtolower(preg_replace('/^.*\.([^.]+)$/', '$1', $file_name));
  		switch( $ext ){
  			case 'jpeg':
  			case 'jpg':
  				return self::JPEG;
  				break;
  			case 'otf':
  				return self::OpenType;
  				break;
  			case 'opf':
  				return self::OPF2;
  				break;
  			case 'smil':
  				return self::MediaOverlays301;
  				break;
  			case 'js':
  				return self::JS;
  				break;
  			default:
  				$const_name = strtoupper($ext);
  				$refl = new \ReflectionClass(get_called_class());
  				return $refl->getConstant($const_name);
  				break;
  		}
  	}
code_tokens: public static function getTypeFromPath ( $ file_name ) { $ ext = strtolower ( preg_replace ( '/^.*\.([^.]+)$/' , '$1' , $ file_name ) ) ; switch ( $ ext ) { case 'jpeg' : case 'jpg' : return self :: JPEG ; break ; case 'otf' : return self :: OpenType ; break ; case 'opf' : return self :: OPF2 ; break ; case 'smil' : return self :: MediaOverlays301 ; break ; case 'js' : return self :: JS ; break ; default : $ const_name = strtoupper ( $ ext ) ; $ refl = new \ ReflectionClass ( get_called_class ( ) ) ; return $ refl -> getConstant ( $ const_name ) ; break ; } }
docstring: Get extension from file path
  
  @param string $file_name
  
  @return string
docstring_tokens: Get extension from file path