lionar / messages
the base rules for lionar messages.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/lionar/messages
Requires
- php: >=5.5.9
- lionar/support: *
Requires (Dev)
This package is not auto-updated.
Last update: 2025-10-12 01:08:15 UTC
README
Lionar messages provides a secure layer to create valid messages. The following validation rules are automatically applied when using this package.
Validation rules
- A paragraph consists of maximum 140 characters
- A title consists of maximum 70 characters
- Any html provided inside a message is automatically escaped with htmlentities
Usage
use Messages\Message; use Messages\Paragraph; use Messages\Text; require __DIR__ . '/vendor/autoload.php'; $text = new Text; $paragraph = new Paragraph; $paragraph->with( $text( 'Our new site is online, go take a look: http://eyedouble.nl' ) ); $message = new Message( $paragraph ); echo $message->body; // 'Our new site is online, go take a look: http://eyedouble.nl'