PhpOffice\PhpPresentation\Style\Color::setARGB PHP Метод

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

Set ARGB
public setARGB ( string $pValue = self::COLOR_BLACK ) : Color
$pValue string
Результат Color
    public function setARGB($pValue = self::COLOR_BLACK)
    {
        if ($pValue == '') {
            $pValue = self::COLOR_BLACK;
        }
        $this->argb = $pValue;
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Test get/set ARGB
  */
 public function testSetGetARGB()
 {
     $object = new Color();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Color', $object->setARGB());
     $this->assertEquals(Color::COLOR_BLACK, $object->getARGB());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Color', $object->setARGB(''));
     $this->assertEquals(Color::COLOR_BLACK, $object->getARGB());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Color', $object->setARGB(Color::COLOR_BLUE));
     $this->assertEquals(Color::COLOR_BLUE, $object->getARGB());
 }