for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Serhii Nekhaienko <[email protected]>
* @license GPL
* @copyright Serhii Nekhaienko © 2018
* @version 4.0.0
* @project browser-detector
*/
namespace EndorphinStudio\Detector\Storage;
use EndorphinStudio\Detector\Exception\StorageException;
abstract class AbstractStorage implements StorageInterface
{
protected $dataDirectory;
* @param string $directory
* @throws StorageException
public function setDataDirectory(string $directory)
if (!is_dir($directory)) {
$exception = new StorageException(sprintf(StorageException::DIRECTORY_NOT_FOUND, $directory));
$exception->setDirectory($exception);
$exception->setProvider(static::class);
throw $exception;
}
$this->dataDirectory = $directory;
public abstract function getConfig(): array;