35 return empty($item) ? null : $item[
'CRM_NAME'];
48 return empty($item) ? null : $item[
'ADS_NAME'];
61 foreach ($items as $item)
63 if (empty($item[
'CRM_NAME']))
67 if (empty($item[
'ADS_NAME']))
72 $this->
addItem($item[
'CRM_NAME'], $item[
'ADS_NAME']);
87 public function addItem($crmName,
string $adsName)
99 'CRM_NAME' => $crmName,
100 'ADS_NAME' => $adsName,
106 protected function getMapItem($crmName =
null, $adsName =
null)
108 if (empty($crmName) && empty($adsName))
113 foreach ($this->map as $item)
115 if ($crmName && $item[
'CRM_NAME'] === $crmName)
120 if ($adsName && $item[
'ADS_NAME'] === $adsName)
setItems(array $items=[])
__construct(array $items=[])
getMapItem($crmName=null, $adsName=null)
addItem($crmName, string $adsName)