for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Maknz\Slack;
use Maknz\Slack\BlockElement\Text;
trait ImageTrait
{
/**
* The image URL.
*
* @var string
*/
protected $url;
* The alternative text for the image.
protected $alt_text;
* The image title.
* @var \Maknz\Slack\BlockElement\Text
protected $title;
* Get the image URL.
* @return string
public function getUrl()
return $this->url;
}
* Set the image URL.
* @param string $url
* @return $this
public function setUrl($url)
$this->url = $url;
return $this;
* Get the alternative text for the image.
public function getAltText()
return $this->alt_text;
* Set the alternative text for the image.
* @param mixed $text
public function setAltText($text)
$this->alt_text = $text;
* Get the image title.
* @return \Maknz\Slack\BlockElement\Text
public function getTitle()
return $this->title;
* Set the image title.
* @param mixed $title
* @throws \InvalidArgumentException
public function setTitle($title)
$this->title = Text::create($title, Text::TYPE_PLAIN);