| 1: | <?php declare(strict_types=1); |
| 2: | |
| 3: | namespace Salient\Contract\Console\Format; |
| 4: | |
| 5: | use Salient\Contract\Console\HasMessageType; |
| 6: | use Salient\Contract\Core\Immutable; |
| 7: | use Salient\Contract\HasMessageLevel; |
| 8: | |
| 9: | /** |
| 10: | * @api |
| 11: | */ |
| 12: | interface MessageAttributesInterface extends |
| 13: | Immutable, |
| 14: | HasMessageLevel, |
| 15: | HasMessageType |
| 16: | { |
| 17: | /** |
| 18: | * Get the message level |
| 19: | * |
| 20: | * @return MessageAttributesInterface::LEVEL_* |
| 21: | */ |
| 22: | public function getLevel(): int; |
| 23: | |
| 24: | /** |
| 25: | * Get the message type |
| 26: | * |
| 27: | * @return MessageAttributesInterface::TYPE_* |
| 28: | */ |
| 29: | public function getType(): int; |
| 30: | |
| 31: | /** |
| 32: | * Check if the instance applies to the first part of a message |
| 33: | */ |
| 34: | public function isMsg1(): bool; |
| 35: | |
| 36: | /** |
| 37: | * Check if the instance applies to the second part of a message |
| 38: | */ |
| 39: | public function isMsg2(): bool; |
| 40: | |
| 41: | /** |
| 42: | * Check if the instance applies to a message prefix |
| 43: | */ |
| 44: | public function isPrefix(): bool; |
| 45: | |
| 46: | /** |
| 47: | * Get an instance that applies to the first part of a message |
| 48: | * |
| 49: | * @return static |
| 50: | */ |
| 51: | public function withMsg1(); |
| 52: | |
| 53: | /** |
| 54: | * Get an instance that applies to the second part of a message |
| 55: | * |
| 56: | * @return static |
| 57: | */ |
| 58: | public function withMsg2(); |
| 59: | |
| 60: | /** |
| 61: | * Get an instance that applies to a message prefix |
| 62: | * |
| 63: | * @return static |
| 64: | */ |
| 65: | public function withPrefix(); |
| 66: | } |
| 67: |