PhpOffice\PhpPresentation\Style\Alignment::setVertical PHP Method

setVertical() public method

Set Vertical
public setVertical ( string $pValue = self::VERTICAL_BASE ) : Alignment
$pValue string
return Alignment
    public function setVertical($pValue = self::VERTICAL_BASE)
    {
        if ($pValue == '') {
            $pValue = self::VERTICAL_BASE;
        }
        $this->vertical = $pValue;
        return $this;
    }

Usage Example

 /**
  * Test get/set vertical
  */
 public function testSetGetVertical()
 {
     $object = new Alignment();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setVertical(''));
     $this->assertEquals(Alignment::VERTICAL_BASE, $object->getVertical());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setVertical(Alignment::VERTICAL_AUTO));
     $this->assertEquals(Alignment::VERTICAL_AUTO, $object->getVertical());
 }