PhpOffice\PhpPresentation\Style\Font::setStrikethrough PHP Метод

setStrikethrough() публичный Метод

Set Strikethrough
public setStrikethrough ( boolean $pValue = false ) : Font
$pValue boolean
Результат Font
    public function setStrikethrough($pValue = false)
    {
        if ($pValue == '') {
            $pValue = false;
        }
        $this->strikethrough = $pValue;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Test get/set strikethrough
  */
 public function testSetIsStriketrough()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setStrikethrough());
     $this->assertFalse($object->isStrikethrough());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setStrikethrough(''));
     $this->assertFalse($object->isStrikethrough());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setStrikethrough(false));
     $this->assertFalse($object->isStrikethrough());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setStrikethrough(true));
     $this->assertTrue($object->isStrikethrough());
 }