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.
 
 
 
 
 

46 lines
885 B

<?php
namespace App\Models;
use SleekDB\Store;
use SleekDB\Query;
/**
* Abstract Class for Stores
*
*
* @author Björn Hase
* @link https://gitea.tentakelfabrik.de/mITSM/feedback GitHub Repository
*
*/
class ModelAbstract
{
// store of model
public $store;
// name of store
protected $name;
// configuration of store
protected $configuration = [
'auto_cache' => true,
'cache_lifetime' => null,
'timeout' => 120,
'primary_key' => '_id',
'search' => [
'min_length' => 2,
'mode' => 'or',
'score_key' => 'scoreKey',
'algorithm' => Query::SEARCH_ALGORITHM['hits']
]
];
/**
*
*
*/
public function __construct()
{
$this->store = new Store($this->name, __DIR__.'/../../storage/database', $this->configuration);
}
}