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.
36 lines
707 B
36 lines
707 B
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
/**
|
|
*
|
|
*
|
|
* @author Björn Hase, Tentakelfabrik
|
|
* @license http://opensource.org/licenses/MIT The MIT License
|
|
* @link https://gitea.tentakelfabrik.de/Tentakelfabrik/super-gear-directus
|
|
*
|
|
*/
|
|
|
|
abstract class RepositoryAbstract
|
|
{
|
|
/** endpoint for request */
|
|
protected $endpoint;
|
|
|
|
/** queryBuilder from pirectus */
|
|
protected $queryBuilder;
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$pirectus = \Flight::pirectus();
|
|
|
|
if ($pirectus) {
|
|
$this->queryBuilder = $pirectus->items($this->endpoint);
|
|
} else {
|
|
throw new \Exception('Error! Pirectus not initialized!');
|
|
}
|
|
}
|
|
} |