Skip to content

somework/offset-page-logic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offset Page Logic

Author: Igor Pinchuk
Email: i.pinchuk.work@gmail.com

Travis build Scrutinizer Code Quality SensioLabsInsight StyleCI

Package that handle problem when you have only page, pagesize source interface and you need offset limit interface

$offset = 0;
$limit = 0;
$nowCount = 0;

$result = \SomeWork\OffsetPage\Logic\Offset::logic($offset, $limit, $nowCount);
$result->getPage(); //0
$result->getSize(); //0
$offset = 0;
$limit = 5;
$nowCount = 5;

$result = \SomeWork\OffsetPage\Logic\Offset::logic($offset, $limit, $nowCount);
// Throw exception \SomeWork\OffsetPage\Logic\AlreadyGetNeededCountException

License

MIT

About

Offset,Limit To Page,PageSize convertation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages