alignment = new Alignment(); } /** * Get width * * @return int */ public function getWidth() { return $this->width; } /** * Set width * * @param int $value * @return self */ public function setWidth($value = null) { $this->width = $value; return $this; } /** * Get height * * @return int */ public function getHeight() { return $this->height; } /** * Set height * * @param int $value * @return self */ public function setHeight($value = null) { $this->height = $value; return $this; } /** * Get alignment * * @return string */ public function getAlign() { return $this->alignment->getValue(); } /** * Set alignment * * @param string $value * @return self */ public function setAlign($value = null) { $this->alignment->setValue($value); return $this; } /** * Get margin top * * @return int|float */ public function getMarginTop() { return $this->marginTop; } /** * Set margin top * * @param int|float $value * @return self */ public function setMarginTop($value = 0) { $this->marginTop = $this->setFloatVal($value, 0); return $this; } /** * Get margin left * * @return int|float */ public function getMarginLeft() { return $this->marginLeft; } /** * Set margin left * * @param int|float $value * @return self */ public function setMarginLeft($value = 0) { $this->marginLeft = $this->setFloatVal($value, 0); return $this; } /** * Get wrapping style * * @return string */ public function getWrappingStyle() { return $this->wrappingStyle; } /** * Set wrapping style * * @param string $wrappingStyle * @throws \InvalidArgumentException * @return self */ public function setWrappingStyle($wrappingStyle) { $enum = array( self::WRAPPING_STYLE_INLINE, self::WRAPPING_STYLE_INFRONT, self::WRAPPING_STYLE_BEHIND, self::WRAPPING_STYLE_SQUARE, self::WRAPPING_STYLE_TIGHT, ); $this->wrappingStyle = $this->setEnumVal($wrappingStyle, $enum, $this->wrappingStyle); return $this; } /** * Get positioning type * * @return string */ public function getPositioning() { return $this->positioning; } /** * Set positioning type * * @param string $positioning * @throws \InvalidArgumentException * @return self */ public function setPositioning($positioning) { $enum = array(self::POSITION_RELATIVE, self::POSITION_ABSOLUTE); $this->positioning = $this->setEnumVal($positioning, $enum, $this->positioning); return $this; } /** * Get horizontal alignment * * @return string */ public function getPosHorizontal() { return $this->posHorizontal; } /** * Set horizontal alignment * * @param string $alignment * @throws \InvalidArgumentException * @return self */ public function setPosHorizontal($alignment) { $enum = array( self::POSITION_HORIZONTAL_LEFT, self::POSITION_HORIZONTAL_CENTER, self::POSITION_HORIZONTAL_RIGHT, self::POSITION_ABSOLUTE ); $this->posHorizontal = $this->setEnumVal($alignment, $enum, $this->posHorizontal); return $this; } /** * Get vertical alignment * * @return string */ public function getPosVertical() { return $this->posVertical; } /** * Set vertical alignment * * @param string $alignment * @throws \InvalidArgumentException * @return self */ public function setPosVertical($alignment) { $enum = array( self::POSITION_VERTICAL_TOP, self::POSITION_VERTICAL_CENTER, self::POSITION_VERTICAL_BOTTOM, self::POSITION_VERTICAL_INSIDE, self::POSITION_VERTICAL_OUTSIDE, self::POSITION_ABSOLUTE ); $this->posVertical = $this->setEnumVal($alignment, $enum, $this->posVertical); return $this; } /** * Get horizontal relation * * @return string */ public function getPosHorizontalRel() { return $this->posHorizontalRel; } /** * Set horizontal relation * * @param string $relto * @throws \InvalidArgumentException * @return self */ public function setPosHorizontalRel($relto) { $enum = array( self::POSITION_RELATIVE_TO_MARGIN, self::POSITION_RELATIVE_TO_PAGE, self::POSITION_RELATIVE_TO_COLUMN, self::POSITION_RELATIVE_TO_CHAR, self::POSITION_RELATIVE_TO_LMARGIN, self::POSITION_RELATIVE_TO_RMARGIN, self::POSITION_RELATIVE_TO_IMARGIN, self::POSITION_RELATIVE_TO_OMARGIN, ); $this->posHorizontalRel = $this->setEnumVal($relto, $enum, $this->posHorizontalRel); return $this; } /** * Get vertical relation * * @return string */ public function getPosVerticalRel() { return $this->posVerticalRel; } /** * Set vertical relation * * @param string $relto * @throws \InvalidArgumentException * @return self */ public function setPosVerticalRel($relto) { $enum = array( self::POSITION_RELATIVE_TO_MARGIN, self::POSITION_RELATIVE_TO_PAGE, self::POSITION_RELATIVE_TO_TEXT, self::POSITION_RELATIVE_TO_LINE, self::POSITION_RELATIVE_TO_TMARGIN, self::POSITION_RELATIVE_TO_BMARGIN, self::POSITION_RELATIVE_TO_IMARGIN, self::POSITION_RELATIVE_TO_OMARGIN, ); $this->posVerticalRel = $this->setEnumVal($relto, $enum, $this->posVerticalRel); return $this; } }