for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Guillermoandrae\DynamoDb\Contract;
/**
* Trait for limit aware operations.
*
* @author Guillermo A. Fisher <[email protected]>
*/
trait LimitAwareOperationTrait
{
* @var int The result offset.
protected $offset = 0;
* @var int|null The result limit.
protected $limit;
* Registers the result offset with this object.
* @param integer $offset The result offset.
* @return mixed An implementation of this trait.
final public function setOffset(int $offset)
$this->offset = $offset;
return $this;
}
* Registers the result limit with this object.
* @param integer|null $limit The result limit.
final public function setLimit(?int $limit)
$this->limit = $limit;
public function toArray(): array
return [
'Limit' => $this->offset + $this->limit
];