mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 16:46:50 +02:00
CoreImage: API rework
This commit is contained in:
@@ -14,13 +14,19 @@ class e_file_inspector_sqlphar extends e_file_inspector
|
||||
private $coreImage;
|
||||
|
||||
/**
|
||||
* e_file_inspector_sqlphar constructor.
|
||||
* @param $pharFilePath string Absolute path to the file inspector database
|
||||
*/
|
||||
public function __construct($pharFilePath = null)
|
||||
{
|
||||
if ($pharFilePath === null) $pharFilePath = e_ADMIN . "core_image.php";
|
||||
Phar::loadPhar($pharFilePath, "core_image.phar");
|
||||
parent::__construct($pharFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function loadDatabase()
|
||||
{
|
||||
Phar::loadPhar($this->database, "core_image.phar");
|
||||
$tmpFile = tmpfile();
|
||||
$tmpFilePath = stream_get_meta_data($tmpFile)['uri'];
|
||||
$this->copyUrlToResource("phar://core_image.phar/core_image.sqlite", $tmpFile);
|
||||
@@ -84,7 +90,6 @@ class e_file_inspector_sqlphar extends e_file_inspector
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Copy file to destination with low memory footprint
|
||||
* @param $source string URL of the source
|
||||
|
Reference in New Issue
Block a user