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