commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SearchIndexingConfigurationModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $products;
27 
32  protected $productsSearch;
33 
38  protected $orders;
39 
44  protected $customers;
45 
46 
50  public function __construct(
55  ) {
56  $this->products = $products;
57  $this->productsSearch = $productsSearch;
58  $this->orders = $orders;
59  $this->customers = $customers;
60  }
61 
68  public function getProducts()
69  {
70  if (is_null($this->products)) {
72  $data = $this->raw(self::FIELD_PRODUCTS);
73  if (is_null($data)) {
74  return null;
75  }
76 
77  $this->products = SearchIndexingConfigurationValuesModel::of($data);
78  }
79 
80  return $this->products;
81  }
82 
89  public function getProductsSearch()
90  {
91  if (is_null($this->productsSearch)) {
93  $data = $this->raw(self::FIELD_PRODUCTS_SEARCH);
94  if (is_null($data)) {
95  return null;
96  }
97 
98  $this->productsSearch = SearchIndexingConfigurationValuesModel::of($data);
99  }
100 
101  return $this->productsSearch;
102  }
103 
110  public function getOrders()
111  {
112  if (is_null($this->orders)) {
114  $data = $this->raw(self::FIELD_ORDERS);
115  if (is_null($data)) {
116  return null;
117  }
118 
119  $this->orders = SearchIndexingConfigurationValuesModel::of($data);
120  }
121 
122  return $this->orders;
123  }
124 
131  public function getCustomers()
132  {
133  if (is_null($this->customers)) {
135  $data = $this->raw(self::FIELD_CUSTOMERS);
136  if (is_null($data)) {
137  return null;
138  }
139 
140  $this->customers = SearchIndexingConfigurationValuesModel::of($data);
141  }
142 
143  return $this->customers;
144  }
145 
146 
151  {
152  $this->products = $products;
153  }
154 
159  {
160  $this->productsSearch = $productsSearch;
161  }
162 
167  {
168  $this->orders = $orders;
169  }
170 
175  {
176  $this->customers = $customers;
177  }
178 }
__construct(?SearchIndexingConfigurationValues $products=null, ?SearchIndexingConfigurationValues $productsSearch=null, ?SearchIndexingConfigurationValues $orders=null, ?SearchIndexingConfigurationValues $customers=null)