"\AtolOnline\Entities\Company", 'correction_info' => "\AtolOnline\Entities\CorrectionInfo", 'payments' => "array", 'vats' => "\AtolOnline\Collections\Vats|null", 'cashier' => "null|string", ])] public function toArray() { return $this->jsonSerialize(); } /** * Возвращает строковое представление json-структуры объекта * * @return false|string */ public function __toString() { return json_encode($this->toArray(), JSON_UNESCAPED_UNICODE); } /** * @inheritDoc */ public function offsetExists(mixed $offset): bool { return isset($this->toArray()[$offset]); } /** * @inheritDoc */ public function offsetGet(mixed $offset): mixed { return $this->toArray()[$offset]; } /** * @inheritDoc */ public function offsetSet(mixed $offset, mixed $value): void { throw new BadMethodCallException( 'Объект ' . static::class . ' нельзя изменять как массив. Следует использовать сеттеры.' ); } /** * @inheritDoc */ public function offsetUnset(mixed $offset): void { throw new BadMethodCallException( 'Объект ' . static::class . ' нельзя изменять как массив. Следует использовать сеттеры.' ); } }