Oihana PHP

TarExtension uses ConstantsTrait

FileExtension

Enumeration class that defines various file extension supported by the application.

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

TAR  : string = '.tar'
TAR_BZ2  : string = '.tar.bz2'
TAR_GZ  : string = '.tar.gz'
TAR_LZ  : string = '.tar.lz'
TAR_LZMA  : string = '.tar.lzma'
TAR_LZO  : string = '.tar.lzo'
TAR_XZ  : string = '.tar.xz'
TAR_Z  : string = '.tar.Z'
TAR_ZST  : string = '.tar.zst'
TBZ2  : string = '.tbz2'
TGZ  : string = '.tgz'
TXZ  : string = '.txz'

Methods

getCompressionExtension()  : string
Gets the file extension added by Phar compression.
getExtensionForCompression()  : string
Gets the appropriate file extension for a compression type.

Constants

Methods

getCompressionExtension()

Gets the file extension added by Phar compression.

public static getCompressionExtension(string $compression) : string
Parameters
$compression : string

The compression type.

Tags
throws
UnsupportedCompressionException
Return values
string

The extension added by compression.

getExtensionForCompression()

Gets the appropriate file extension for a compression type.

public static getExtensionForCompression(string $compression) : string
Parameters
$compression : string

The compression type.

Tags
throws
UnsupportedCompressionException
Return values
string

The file extension.

On this page

Search results