Response::fetch

  1. Bitrix24 API (v. 23.675.0)
  2. seo
  3. Response
  4. fetch
  • Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/retargeting/response.php
  • Класс: BitrixSeoRetargetingResponse
  • Вызов: Response::fetch
public function fetch()
{
	if(is_array($this->data) && !isset($this->data[0]))
	{
		if ($this->fetchIterator == 0)
		{
			$row = $this->data;
			$this->fetchIterator++;
		}
		else
		{
			return null;
		}
	}
	else if(is_array($this->data) && isset($this->data[$this->fetchIterator]))
	{
		$row = $this->data[$this->fetchIterator];
		$this->fetchIterator++;
	}
	else
	{
		return null;
	}

	if (is_array($row))
	{
		$result = array();
		foreach ($row as $k => $v)
		{
			$result[mb_strtoupper($k)] = $v;
		}

		return $result;
	}
	else
	{
		return $row;
	}
}

Добавить комментарий