vendor/bundles/Pagerfanta/Adapter/AdapterInterface.php
changeset 15 99ad73ef7385
equal deleted inserted replaced
14:fc78844c8a76 15:99ad73ef7385
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of the Pagerfanta package.
       
     5  *
       
     6  * (c) Pablo Díez <pablodip@gmail.com>
       
     7  *
       
     8  * For the full copyright and license information, please view the LICENSE
       
     9  * file that was distributed with this source code.
       
    10  */
       
    11 
       
    12 namespace Pagerfanta\Adapter;
       
    13 
       
    14 /**
       
    15  * AdapterInterface.
       
    16  *
       
    17  * @author Pablo Díez <pablodip@gmail.com>
       
    18  *
       
    19  * @api
       
    20  */
       
    21 interface AdapterInterface
       
    22 {
       
    23     /**
       
    24      * Returns the number of results.
       
    25      *
       
    26      * @return integer The number of results.
       
    27      *
       
    28      * @api
       
    29      */
       
    30     function getNbResults();
       
    31 
       
    32     /**
       
    33      * Returns an slice of the results.
       
    34      *
       
    35      * @param integer $offset The offset.
       
    36      * @param integer $length The length.
       
    37      *
       
    38      * @return array The slice.
       
    39      *
       
    40      * @api
       
    41      */
       
    42     function getSlice($offset, $length);
       
    43 }