PhpOffice\PhpPresentation\Shape\Comment\Author::setIndex PHP Method

setIndex() public method

public setIndex ( integer $idxAuthor ) : Author
$idxAuthor integer
return Author
    public function setIndex($idxAuthor)
    {
        $this->idxAuthor = (int) $idxAuthor;
        return $this;
    }

Usage Example

Example #1
0
 public function testGetSetIndex()
 {
     $expectedVal = rand(1, 100);
     $object = new Author();
     $this->assertNull($object->getIndex());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Comment\\Author', $object->setIndex($expectedVal));
     $this->assertEquals($expectedVal, $object->getIndex());
 }