Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Search
Response
Aggregation.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Search\Response
;
7
8
use
Magento\Framework\Api\Search\AggregationInterface
;
9
use
Magento\Framework\Api\Search\BucketInterface
;
10
16
class
Aggregation
implements
AggregationInterface
, \IteratorAggregate
17
{
23
protected
$buckets
;
24
28
public
function
__construct
(array
$buckets
)
29
{
30
$this->buckets =
$buckets
;
31
}
32
38
public
function
getIterator
()
39
{
40
return
new \ArrayIterator($this->buckets);
41
}
42
49
public
function
getBucket
($bucketName)
50
{
51
return
$this->buckets[$bucketName] ??
null
;
52
}
53
59
public
function
getBuckets
()
60
{
61
return
$this->buckets
;
62
}
63
69
public
function
getBucketNames
()
70
{
71
return
array_keys($this->buckets);
72
}
73
}
Magento\Framework\Search\Response\Aggregation\getBuckets
getBuckets()
Definition:
Aggregation.php:59
Magento\Framework\Search\Response\Aggregation\getBucket
getBucket($bucketName)
Definition:
Aggregation.php:49
Magento\Framework\Search\Response\Aggregation
Definition:
Aggregation.php:16
Magento\Framework\Api\Search\BucketInterface
Definition:
BucketInterface.php:11
Magento\Framework\Search\Response\Aggregation\getIterator
getIterator()
Definition:
Aggregation.php:38
Magento\Framework\Api\Search\AggregationInterface
Definition:
AggregationInterface.php:11
Magento\Framework\Search\Response\Aggregation\__construct
__construct(array $buckets)
Definition:
Aggregation.php:28
Magento\Framework\Search\Response\Aggregation\getBucketNames
getBucketNames()
Definition:
Aggregation.php:69
Magento\Framework\Search\Response
Magento\Framework\Search\Response\Aggregation\$buckets
$buckets
Definition:
Aggregation.php:23