Wildcards
Wildcards allow you to match multiple items in arrays and collections using the * symbol. They work across all Data Helpers classes and enable powerful bulk operations.
Basic Wildcard Usage
Section titled “Basic Wildcard Usage”Use * to match any single segment at that position:
$data = [ 'users' => [ ['name' => 'Alice', 'email' => 'alice@example.com'], ['name' => 'Bob', 'email' => 'bob@example.com'], ],];
$accessor = new DataAccessor($data);$emails = $accessor->get('users.*.email');Deep Wildcards
Section titled “Deep Wildcards”Multiple * can appear in one path:
$skus = $accessor->get('orders.*.items.*.sku');Wildcard Operators
Section titled “Wildcard Operators”Use SQL-like operators with wildcards:
- WHERE - Filter items
- ORDER BY - Sort items
- LIMIT/OFFSET - Pagination
- GROUP BY - Aggregations
- DISTINCT - Remove duplicates
See DataMapper for detailed examples.