Rectangle Class¶
- class Rectangle¶
Represents a Rectangle block
- __construct(array|string $colour)¶
Create a new Rectangle block
- Parameters:
$condition (
?string) –The block colour
array - RGB(A) where RGB values are 0 <= value <= 255, and A is 0 <= value <= 1
string - HTML colour
- Returns:
A new instance of
Rectangle- Return type:
- addItem(ItemInterface ...$item)¶
Add item(s)
- Parameters:
...$item (
ItemInterface) – The item(s)
- Returns:
A new instance of
Rectanglewith the item(s) added- Return type:
- withComment(string $comment)¶
Sets a comment for the Rectangle
- Parameters:
$comment (
string) – The comment
- Returns:
A new instance of
Rectanglewith the comment- Return type: