first commit

This commit is contained in:
2019-03-28 17:57:56 +01:00
commit b0e25fd66f
561 changed files with 56803 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
<?php
/**
* @package Grav\Framework\Collection
*
* @copyright Copyright (C) 2015 - 2018 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Framework\Collection;
use Doctrine\Common\Collections\AbstractLazyCollection as BaseAbstractLazyCollection;
/**
* General JSON serializable collection.
*
* @package Grav\Framework\Collection
*/
abstract class AbstractLazyCollection extends BaseAbstractLazyCollection implements CollectionInterface
{
/**
* The backed collection to use
*
* @var ArrayCollection
*/
protected $collection;
/**
* {@inheritDoc}
*/
public function reverse()
{
$this->initialize();
return $this->collection->reverse();
}
/**
* {@inheritDoc}
*/
public function shuffle()
{
$this->initialize();
return $this->collection->shuffle();
}
/**
* {@inheritDoc}
*/
public function chunk($size)
{
$this->initialize();
return $this->collection->chunk($size);
}
/**
* {@inheritDoc}
*/
public function jsonSerialize()
{
$this->initialize();
return $this->collection->jsonSerialize();
}
}