server/src/app/Repositories/DocumentRepository.php
author Chloe Laisne <chloe.laisne@gmail.com>
Fri, 05 Aug 2016 14:55:45 +0200
changeset 251 ac320de33ec7
parent 168 17f10b56c079
child 306 3fccf43160a7
permissions -rw-r--r--
Add transcript button to player-component

<?php
namespace CorpusParole\Repositories;

use CorpusParole\Models\Document;

interface DocumentRepository {

    public function all();

    public function get($id, bool $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);

    /**
     * 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();
}