Repo for the search and displace ingest module that takes odf, docx and pdf and transforms it into .md to be used with search and displace operations
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.
|
|
<?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); } }
|