for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Nexylan packages.
*
* (c) Nexylan SAS <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nexy\Slack;
/**
* @author Sullivan Senechal <[email protected]>
final class ActionConfirmation
{
* The required title for the pop up window.
* @var string
private $title;
* The required description.
private $text;
* The text label for the OK button.
* @var string|null
private $okText;
* The text label for the Cancel button.
private $dismissText;
public function __construct(string $title, string $text)
$this->title = $title;
$this->text = $text;
}
public function getTitle(): string
return $this->title;
public function getText(): string
return $this->text;
public function getOkText(): ?string
return $this->okText;
* @return ActionConfirmation
public function setOkText(?string $okText): self
$this->okText = $okText;
return $this;
public function getDismissText(): ?string
return $this->dismissText;
public function setDismissText(?string $dismissText): self
$this->dismissText = $dismissText;
* Get the array representation of this action confirmation.
public function toArray(): array
return [
'title' => $this->title,
'text' => $this->text,
'ok_text' => $this->okText,
'dismiss_text' => $this->dismissText,
];