PhpOffice\PhpPresentation\Style\Font::setName PHP Method

setName() public method

Set Name
public setName ( string $pValue = 'Calibri' ) : Font
$pValue string
return Font
    public function setName($pValue = 'Calibri')
    {
        if ($pValue == '') {
            $pValue = 'Calibri';
        }
        $this->name = $pValue;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * Test get/set name
  */
 public function testSetGetName()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setName());
     $this->assertEquals('Calibri', $object->getName());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setName(''));
     $this->assertEquals('Calibri', $object->getName());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setName('Arial'));
     $this->assertEquals('Arial', $object->getName());
 }
All Usage Examples Of PhpOffice\PhpPresentation\Style\Font::setName