Maknz\Slack\Attachment::getColor PHP Метод

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

Get the color to use for the attachment.
public getColor ( ) : string
Результат string
    public function getColor()
    {
        return $this->color;
    }

Usage Example

Пример #1
0
 public function testAttachmentCreationFromArray()
 {
     $a = new Attachment(['fallback' => 'Fallback', 'text' => 'Text', 'pretext' => 'Pretext', 'color' => 'bad', 'mrkdwn_in' => ['pretext', 'text', 'fields']]);
     $this->assertEquals('Fallback', $a->getFallback());
     $this->assertEquals('Text', $a->getText());
     $this->assertEquals('Pretext', $a->getPretext());
     $this->assertEquals('bad', $a->getColor());
     $this->assertEquals([], $a->getFields());
     $this->assertEquals(['pretext', 'text', 'fields'], $a->getMarkdownFields());
 }
All Usage Examples Of Maknz\Slack\Attachment::getColor