for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Anorgan\Deployer\Common\Server;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
abstract class AbstractServer
{
protected $title;
protected $path;
/**
* @var LoggerInterface
*/
protected $logger;
protected $hostname = null;
* @var array
protected $commands = [];
* @param string $title
* @param string $path
* @param LoggerInterface $logger
public function __construct($title, $path, LoggerInterface $logger = null)
$this->title = $title;
$this->path = $path;
if (null === $logger) {
$logger = new NullLogger();
}
$this->logger = $logger;
public function setLogger($logger)
* @return string
public function getTitle()
return $this->title;
public function setTitle($title)
public function getPath()
return $this->path;
public function setPath($path)
public function getHostname()
return $this->hostname;
* @param string $hostname
public function setHostname($hostname)
$this->hostname = $hostname;
* @return array
public function getCommands()
return $this->commands;
* @param array $commands
public function setCommands(array $commands)
$this->commands = $commands;
abstract public function runCommands();