mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
delete unused config class
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Alchemy\Phrasea\WorkerManager\Configuration;
|
|
||||||
|
|
||||||
class Config
|
|
||||||
{
|
|
||||||
const WORKER_DATABASE_FILE = 'worker.db';
|
|
||||||
|
|
||||||
public static function getPluginDatabaseFile()
|
|
||||||
{
|
|
||||||
$dbDir = realpath(dirname(__FILE__) . "/../") . "/Db" ;
|
|
||||||
|
|
||||||
if (!is_dir($dbDir)) {
|
|
||||||
mkdir($dbDir, 0755, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$dbFile = $dbDir . '/' . self::WORKER_DATABASE_FILE;
|
|
||||||
|
|
||||||
if (!is_file($dbFile)) {
|
|
||||||
file_put_contents($dbFile, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $dbFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getWorkerSqliteConnection()
|
|
||||||
{
|
|
||||||
$db_conn = 'sqlite:'. self::getPluginDatabaseFile();
|
|
||||||
$pdo = new \PDO($db_conn);
|
|
||||||
|
|
||||||
return $pdo;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user