for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace phpbu\App\Backup\Target\Compression;
use phpbu\App\Backup\Target\Compression;
/**
* Abstraction
*
* @package phpbu
* @subpackage Backup
* @author Sebastian Feldmann <[email protected]>
* @copyright Sebastian Feldmann <[email protected]>
* @license https://opensource.org/licenses/MIT The MIT License (MIT)
* @link http://phpbu.de/
* @since Class available since Release 3.2.1
*/
abstract class Abstraction implements Compression
{
* Command name
* @var string
protected $cmd;
* Path to command binary
protected $path;
* Suffix for compressed files
protected $suffix;
* MIME type for compressed files
protected $mimeType;
* Can this compression compress piped output
* @var bool
protected $pipeable;
* Constructor.
* @param string $path
public function __construct(string $path = '')
$this->path = $path;
}
* Return the cli command.
* @return string
public function getCommand() : string
return $this->cmd;
* Return a list of acceptable exit codes.
* @return int[]
public function getAcceptableExitCodes(): array
return [0];
* Path getter.
public function getPath() : string
return $this->path;
* Returns the compressor suffix e.g. 'bz2'.
public function getSuffix() : string
return $this->suffix;
* Is the compression app pipeable.
* @return bool
public function isPipeable() : bool
return $this->pipeable;
* Returns the compressor mime type.
public function getMimeType() : string
return $this->mimeType;