for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace DingNotice\Messages;
use DingNotice\DingTalkService;
class ActionCard extends Message
{
protected $service;
public function __construct(DingTalkService $service,$title, $markdown, $hideAvatar = 0, $btnOrientation = 0)
$this->service = $service;
$this->setMessage($title,$markdown,$hideAvatar,$btnOrientation);
}
public function setMessage($title, $markdown, $hideAvatar = 0, $btnOrientation = 0){
$this->message = [
'msgtype' => 'actionCard',
'actionCard' => [
'title' => $title,
'text' => $markdown,
'hideAvatar' => $hideAvatar,
'btnOrientation' => $btnOrientation
]
];
public function single($title,$url){
$this->message['actionCard']['singleTitle'] = $title;
$this->message['actionCard']['singleURL'] = $url;
$this->service->setMessage($this);
return $this;
public function addButtons($title,$url){
$this->message['actionCard']['btns'][] = [
'actionURL' => $url
public function send(){
return $this->service->send();