mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
22 lines
658 B
PHP
22 lines
658 B
PHP
<?php
|
|
|
|
namespace BookStack\Entities\Queries;
|
|
|
|
use BookStack\Entities\Models\Entity;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
/**
|
|
* Interface for our classes which provide common queries for our
|
|
* entity objects. Ideally all queries for entities should run through
|
|
* these classes.
|
|
* Any added methods should return a builder instances to allow extension
|
|
* via building on the query, unless the method starts with 'find'
|
|
* in which case an entity object should be returned.
|
|
* (nullable unless it's a *OrFail method).
|
|
*/
|
|
interface ProvidesEntityQueries
|
|
{
|
|
public function start(): Builder;
|
|
public function findVisibleById(int $id): ?Entity;
|
|
}
|