invoiceninja/app/Libraries/Skype/HeroCard.php

36 lines
704 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Libraries\Skype;
2016-08-10 15:57:34 +03:00
2016-08-10 17:04:17 +03:00
use stdClass;
2016-08-10 15:57:34 +03:00
class HeroCard
{
public function __construct()
{
$this->contentType = 'application/vnd.microsoft.card.hero';
2017-01-30 21:40:43 +02:00
$this->content = new stdClass();
2016-08-10 15:57:34 +03:00
$this->content->buttons = [];
}
public function setTitle($title)
{
$this->content->title = $title;
}
public function setSubitle($subtitle)
{
$this->content->subtitle = $subtitle;
}
2016-08-10 17:04:17 +03:00
public function setText($text)
{
$this->content->text = $text;
}
2016-08-13 22:19:37 +03:00
public function addButton($type, $title, $value, $url = false)
2016-08-10 15:57:34 +03:00
{
2016-08-13 22:19:37 +03:00
$this->content->buttons[] = new ButtonCard($type, $title, $value, $url);
2016-08-10 15:57:34 +03:00
}
}