Pagination is the process of dividing a long list of results into easier to consume pages. By only loading one page at a time, memory is preserved. This applies to RDBMS result sets, collections of serialized items in an API, or listings in list views of simple CRUD applications. Although the needs are often the same, many libraries define their own objects, or even use plain arrays to represent a paginated result. As a result, projects consuming these libraries often end up defining many adapters for those many libraries.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Sami\Sami; | |
use Sami\Version\GitVersionCollection; | |
use Sami\Parser\Filter\TrueFilter; | |
use Symfony\Component\Finder\Finder; | |
$iterator = Finder::create() | |
->files() | |
->name('*.php') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Marco Pivetta <[email protected]> | |
*/ | |
class LazyLoadableObject | |
{ | |
public $publicIdentifierField; | |
protected $protectedIdentifierField; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE AGGREGATE array_accum (anyarray) | |
( | |
sfunc = array_cat, | |
stype = anyarray, | |
initcond = '{}' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace GoetasWebservices\Xsd\XsdToPhp\Php; | |
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPClass; | |
use GoetasWebservices\Xsd\XsdToPhp\Php\Structure\PHPProperty; | |
use Zend\Code\Generator\ClassGenerator; | |
use Zend\Code\Generator\DocBlock\Tag\VarTag; | |
use Zend\Code\Generator\DocBlockGenerator; | |
use Zend\Code\Generator\MethodGenerator; |