PhpOffice\PhpPresentation\PresentationProperties::setLastView PHP Method

setLastView() public method

public setLastView ( string $value = self::VIEW_SLIDE )
$value string
    public function setLastView($value = self::VIEW_SLIDE)
    {
        if (in_array($value, $this->arrayView)) {
            $this->lastView = $value;
        }
        return $this;
    }

Usage Example

 public function testLastView()
 {
     $object = new PresentationProperties();
     $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView('AAAA'));
     $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView(PresentationProperties::VIEW_OUTLINE));
     $this->assertEquals(PresentationProperties::VIEW_OUTLINE, $object->getLastView());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView());
     $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView());
 }