Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
vendor /
ramsey /
collection /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Exception
[ DIR ]
drwxr-sr-x
2024-02-14 08:51
Map
[ DIR ]
drwxr-sr-x
2023-05-21 12:05
Tool
[ DIR ]
drwxr-sr-x
2023-05-21 12:05
AbstractArray.php
4.27
KB
-rw-r--r--
2025-12-08 10:53
AbstractCollection.php
11.02
KB
-rw-r--r--
2025-12-08 10:53
AbstractSet.php
1.4
KB
-rw-r--r--
2025-12-08 10:53
ArrayInterface.php
1.04
KB
-rw-r--r--
2025-12-08 10:53
Collection.php
2.26
KB
-rw-r--r--
2025-12-08 10:53
CollectionInterface.php
8.94
KB
-rw-r--r--
2025-12-08 10:53
DoubleEndedQueue.php
4.19
KB
-rw-r--r--
2025-12-08 10:53
DoubleEndedQueueInterface.php
10.12
KB
-rw-r--r--
2025-12-08 10:53
GenericArray.php
512
B
-rw-r--r--
2025-12-08 10:53
Queue.php
3.58
KB
-rw-r--r--
2025-12-08 10:53
QueueInterface.php
7.22
KB
-rw-r--r--
2025-12-08 10:53
Set.php
1.53
KB
-rw-r--r--
2025-12-08 10:53
Sort.php
621
B
-rw-r--r--
2025-12-08 10:53
Save
Rename
<?php /** * This file is part of the ramsey/collection library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Collection; /** * A collection represents a group of objects. * * Each object in the collection is of a specific, defined type. * * This is a direct implementation of `CollectionInterface`, provided for * the sake of convenience. * * Example usage: * * ``` * $collection = new \Ramsey\Collection\Collection('My\\Foo'); * $collection->add(new \My\Foo()); * $collection->add(new \My\Foo()); * * foreach ($collection as $foo) { * // Do something with $foo * } * ``` * * It is preferable to subclass `AbstractCollection` to create your own typed * collections. For example: * * ``` * namespace My\Foo; * * class FooCollection extends \Ramsey\Collection\AbstractCollection * { * public function getType() * { * return 'My\\Foo'; * } * } * ``` * * And then use it similarly to the earlier example: * * ``` * $fooCollection = new \My\Foo\FooCollection(); * $fooCollection->add(new \My\Foo()); * $fooCollection->add(new \My\Foo()); * * foreach ($fooCollection as $foo) { * // Do something with $foo * } * ``` * * The benefit with this approach is that you may do type-checking on the * collection object: * * ``` * if ($collection instanceof \My\Foo\FooCollection) { * // the collection is a collection of My\Foo objects * } * ``` * * @template T * @extends AbstractCollection<T> */ class Collection extends AbstractCollection { /** * Constructs a collection object of the specified type, optionally with the * specified data. * * @param string $collectionType The type or class name associated with this * collection. * @param array<array-key, T> $data The initial items to store in the collection. */ public function __construct(private readonly string $collectionType, array $data = []) { parent::__construct($data); } public function getType(): string { return $this->collectionType; } }