server/src/app/Repositories/DocumentRepository.php
author ymh <ymh.work@gmail.com>
Fri, 04 Mar 2016 10:08:52 +0100
changeset 138 3079cbf80006
parent 125 e550b10fe3ca
child 168 17f10b56c079
permissions -rw-r--r--
add subjects save + set modified date when saing document in rest api

<?php
namespace CorpusParole\Repositories;

use CorpusParole\Models\Document;

interface DocumentRepository {

    public function all();

    public function get($id);

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