/** * Sets the box size. The size must include the size and type header, * fields, and all contained boxes. * * The method will propagate size change to box parents. * * @param integer $size The box size. */ protected final function setSize($size) { if ($this->_parent !== null) { $this->_parent->setSize(($this->_parent->getSize() > 0 ? $this->_parent->getSize() : 0) + $size - ($this->_size > 0 ? $this->_size : 0)); } $this->_size = $size; }