📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-03 15:13:53
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
vendor
/
php-flasher
/
flasher
/
Storage
/
Filter
/
Criteria
📍 /home/orkouolp/web/testing.orkobd/laravel/vendor/php-flasher/flasher/Storage/Filter/Criteria
🔄 Refresh
✏️
Editing: FilterCriteria.php
Writable
<?php declare(strict_types=1); namespace Flasher\Prime\Storage\Filter\Criteria; final class FilterCriteria implements CriteriaInterface { /** * @var \Closure[] */ private array $callbacks; /** * @throws \InvalidArgumentException if the criteria type is invalid */ public function __construct(mixed $criteria) { if (!$criteria instanceof \Closure && !\is_array($criteria)) { throw new \InvalidArgumentException(\sprintf('Invalid type for criteria "filter". Expect a closure or array of closure, got "%s".', get_debug_type($criteria))); } $criteria = $criteria instanceof \Closure ? [$criteria] : $criteria; foreach ($criteria as $callback) { if (!$callback instanceof \Closure) { throw new \InvalidArgumentException(\sprintf('Each element must be a closure, got got "%s".', get_debug_type($callback))); } $this->callbacks[] = $callback; } } /** * Applies the filter callbacks to the envelopes. */ public function apply(array $envelopes): array { foreach ($this->callbacks as $callback) { $envelopes = $callback($envelopes); } return $envelopes; } }
💾 Save Changes
❌ Cancel