You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
695 B
35 lines
695 B
<?php
|
|
|
|
namespace App\Ingest;
|
|
|
|
abstract class AbstractConvertor
|
|
{
|
|
protected $storage;
|
|
protected $path;
|
|
protected $directoryPath;
|
|
|
|
public function __construct($storage, $path)
|
|
{
|
|
$this->storage = $storage;
|
|
$this->path = $path;
|
|
$this->directoryPath = pathinfo($path, PATHINFO_DIRNAME);
|
|
}
|
|
|
|
abstract public function execute();
|
|
|
|
public function getPath()
|
|
{
|
|
return $this->path;
|
|
}
|
|
|
|
public function setPath($path)
|
|
{
|
|
$this->path = $path;
|
|
$this->directoryPath = pathinfo($path, PATHINFO_DIRNAME);
|
|
}
|
|
|
|
protected function deleteOriginalDocument()
|
|
{
|
|
$this->storage->delete($this->path);
|
|
}
|
|
}
|