• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/item.php
  • Класс: Bitrix\Crm\Item
  • Вызов: Item::__call
public function __call($name, $arguments)
{
	$method = mb_substr($name, 0, 3);
	$calledFieldName = mb_substr($name, 3);
	$commonFieldName = $this->transformToCommonFieldName($calledFieldName);

	if ($method === 'get')
	{
		return $this->get($commonFieldName);
	}
	if ($method === 'set')
	{
		return $this->set($commonFieldName, ...$arguments);
	}
	$method = mb_substr($name, 0, 9);
	$calledFieldName = mb_substr($name, 9);
	$commonFieldName = $this->transformToCommonFieldName($calledFieldName);
	if ($method === 'isChanged')
	{
		return $this->isChanged($commonFieldName);
	}

	throw new SystemException(sprintf(
		'Unknown method `%s` for object `%s`', $name, static::class
	));
}