![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/vendor/jsdecena/baserepo/src/ |
<?php namespace Jsdecena\Baserepo; use Illuminate\Database\Eloquent\Model; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use League\Fractal\Scope; use League\Fractal\TransformerAbstract; interface BaseRepositoryInterface { /** * @param array $attributes * @return mixed */ public function create(array $attributes); /** * @param array $attributes * @return bool */ public function update(array $attributes) : bool; /** * @param array $columns * @param string $orderBy * @param string $sortBy * @return mixed */ public function all(array $columns = ['*'], string $orderBy = 'id', string $sortBy = 'asc'); /** * @param $id * @return mixed */ public function find($id); /** * @param $id * @return mixed */ public function findOneOrFail($id); /** * @param array $data * @return mixed */ public function findBy(array $data); /** * @param array $data * @return mixed */ public function findOneBy(array $data); /** * @param array $data * @return mixed */ public function findOneByOrFail(array $data); /** * @return bool */ public function delete() : bool; /** * @param array $data * @param int $perPage * @return LengthAwarePaginator */ public function paginateArrayResults(array $data, int $perPage = 50): LengthAwarePaginator; /** * @param Model $model * @param TransformerAbstract $transformer * @param string $resourceKey * @param string|null $includes * @return Scope */ public function processItemTransformer( Model $model, TransformerAbstract $transformer, string $resourceKey, string $includes = null ) : Scope; /** * @param Collection $collection * @param TransformerAbstract $transformer * @param string $resourceKey * @param string|null $includes * @param int $perPage * @return Scope */ public function processCollectionTransformer( Collection $collection, TransformerAbstract $transformer, string $resourceKey, string $includes = null, int $perPage = 25 ) : Scope; /** * @param LengthAwarePaginator $paginator * @param TransformerAbstract $transformer * @param string $resourceKey * @param string|null $includes * @return Scope */ public function processPaginatedResults( LengthAwarePaginator $paginator, TransformerAbstract $transformer, string $resourceKey, string $includes = null ) : Scope; }