mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
30 lines
773 B
PHP
30 lines
773 B
PHP
<?php
|
|
|
|
/**
|
|
* (c) Meritoo.pl, http://www.meritoo.pl
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Meritoo\Common\Contract\Collection;
|
|
|
|
/**
|
|
* Contract for collection that may reduce its elements
|
|
*
|
|
* @author Meritoo <github@meritoo.pl>
|
|
* @copyright Meritoo <http://www.meritoo.pl>
|
|
*/
|
|
interface ReducibleCollectionInterface
|
|
{
|
|
/**
|
|
* Returns new instance of this collection with limited elements
|
|
*
|
|
* @param int $max Maximum elements to return
|
|
* @param int $offset (optional) Position of element from which limitation should start
|
|
* @return $this
|
|
*/
|
|
public function limit(int $max, int $offset = 0): self;
|
|
}
|