/** * Stores some value with the given width and height starting * at some position at the x axis and some position at the y axis. * * @param mixed $valueHolder value holder to associate with position * @param int $xPos * @param int $yPos * * @return null */ public function addValueHolder(ValueHolder $valueHolder, $xPos, $yPos) { if (!isset($this->valueHolders[$yPos])) { $this->valueHolders[$yPos] = []; } $this->valueHolders[$yPos][$xPos] = $valueHolder; $this->width = max([$xPos + $valueHolder->getWidth(), $this->width]); $this->height = max([$yPos + $valueHolder->getHeight(), $this->height]); }
/** * @param ValueHolder $cellModel * * @return DOMNode * @throws UnableToRender */ private function renderCellValue(ValueHolder $cellModel) { try { return $this->atomicValueRenderer->render($cellModel->getHeldValue()); } catch (UnableToRenderAtomicValue $e) { throw new UnableToRender(); } }