for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pageon\SlackWebhookMonolog\Slack\Attachment;
use Pageon\SlackWebhookMonolog\General\SerializeToString;
use Pageon\SlackWebhookMonolog\General\Url;
/**
* The title is displayed as larger, bold text near the top of a message attachment.
* By passing a valid URL in the link parameter (optional), the title text will be hyperlinked.
*
* @author Jelmer Prins <[email protected]>
* @since 0.4.0
*/
final class Title extends SerializeToString
{
* @var string
private $title;
* @var Url|null
private $link;
* @param string $title
* @param Url|null $link
public function __construct($title, Url $link = null)
$this->title = $title;
$this->link = $link;
}
* @return string
public function getTitle()
return $this->title;
* @return bool
public function hasLink()
return $this->link !== null;
* @return Url|null
public function getLink()
return $this->link;
* {@inheritdoc}
public function __toString()
return $this->getTitle();