mirror of
https://github.com/flextype/flextype.git
synced 2025-08-12 16:14:16 +02:00
feat(element-queries): infrastructure changes #436
This commit is contained in:
@@ -15,7 +15,7 @@ use Doctrine\Common\Collections\Expr\Comparison;
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
use Flextype\Component\Arr\Arr;
|
||||
|
||||
class Collections
|
||||
class Collection
|
||||
{
|
||||
/**
|
||||
* Flextype Dependency Container
|
24
src/flextype/Support/helpers.php
Normal file
24
src/flextype/Support/helpers.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Flextype (http://flextype.org)
|
||||
* Founded by Sergey Romanenko and maintained by Flextype Community.
|
||||
*/
|
||||
|
||||
namespace Flextype;
|
||||
|
||||
if (! function_exists('collect')) {
|
||||
/**
|
||||
* Create a collection from the given value.
|
||||
*
|
||||
* @param array $value Items to collect
|
||||
*
|
||||
* @return \Flextype\Collection
|
||||
*/
|
||||
function collect($array)
|
||||
{
|
||||
return new Collection($array);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user