server/src/app/Repositories/DocumentRepository.php
author ymh <ymh.work@gmail.com>
Tue, 13 Dec 2016 23:30:50 +0100
changeset 472 8b1e24e0ef70
parent 326 226d5b17a119
child 502 74fba571487e
permissions -rw-r--r--
Remove wallisian fron nouvelle caledonie as it is already in wallis et futuna (m3.10)

<?php
namespace CorpusParole\Repositories;

use CorpusParole\Models\Document;

interface DocumentRepository {

    public function all();

    public function get($id, $short = false);

    public function save(Document $doc);

    /**
     * Paginate all document as a paginator.
     *
     * @param  int  $perPage
     * @param  string  $pageName
     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
     */
    public function paginateAll($perPage = 15, $pageName = 'page', $page = null);

    /**
     * Paginate filtered document as a paginator.
     *
     * @param  array $filters
     * @param  int  $perPage
     * @param  string  $pageName
     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
     */
    public function paginate($filters = [], $perPage = 15, $pageName = 'page', $page = null, $sort = null);


    /**
     * Resolve lexvo id for all documents in the list
     * this allow to optimise the call of lexvo repository
     */
    public function resolveLexvo(Array $docList);

    public function getCount();
}