PHP Class Crummy\Phlack\Builder\AttachmentBuilder

Inheritance: implements Crummy\Phlack\Builder\BuilderInterface
Show file Open project: mcrumm/phlack

Public Methods

Method Description
__construct ( MessageBuilder $parent = null ) Constructor.
addField ( string $title, string $value, boolean $isShort )
create ( ) : Attachment
end ( ) : MessageBuilder
setAuthorIcon ( $author_icon )
setAuthorLink ( $author_link )
setAuthorName ( $author_name )
setColor ( $color )
setFallback ( $fallback )
setImageUrl ( $image_url )
setMrkdwnIn ( $mrkdwn_in )
setPretext ( $pretext )
setText ( $text )
setThumbUrl ( $thumb_url )
setTitle ( $title )
setTitleLink ( $title_link )

Protected Methods

Method Description
refresh ( ) Reset the attachment data and the fields collection.

Private Methods

Method Description
setParameter ( string $name, $value ) Sets values on non-empty parameters.

Method Details

__construct() public method

Constructor.
public __construct ( MessageBuilder $parent = null )
$parent MessageBuilder

addField() public method

public addField ( string $title, string $value, boolean $isShort )
$title string
$value string
$isShort boolean

create() public method

public create ( ) : Attachment
return Crummy\Phlack\Message\Attachment

end() public method

public end ( ) : MessageBuilder
return MessageBuilder

refresh() protected method

Reset the attachment data and the fields collection.
protected refresh ( )

setAuthorIcon() public method

public setAuthorIcon ( $author_icon )
$author_icon

setAuthorName() public method

public setAuthorName ( $author_name )
$author_name

setColor() public method

public setColor ( $color )
$color

setFallback() public method

public setFallback ( $fallback )
$fallback

setImageUrl() public method

public setImageUrl ( $image_url )
$image_url

setMrkdwnIn() public method

public setMrkdwnIn ( $mrkdwn_in )
$mrkdwn_in

setPretext() public method

public setPretext ( $pretext )
$pretext

setText() public method

public setText ( $text )
$text

setThumbUrl() public method

public setThumbUrl ( $thumb_url )
$thumb_url

setTitle() public method

public setTitle ( $title )
$title