gajmohan/random-wait-message

There is no license information available for the latest version (dev-main) of this package.

A simple package to get random wait message

dev-main 2022-06-09 10:54 UTC

This package is auto-updated.

Last update: 2025-07-09 17:16:51 UTC


README

Simple PHP package to generate random fun wait messages

Usage

Get a random message

    echo RandomWaitMessage::getMessageString();
    // "Put your headphones on and have a personal dance party πŸŽΆπŸ’ƒπŸ•Ί"
    
    # without an emoji
    echo RandomWaitMessage::getMessageString(false);
    // "Catch up on the 16,527 unread emails you have"

Get a random Message as an array

    print_r(RandomWaitMessage::getMessageArray());
    // ['message' => 'Meditate', 'emoji' => 'πŸ§˜β€']

Get all random messages

    print_r(RandomWaitMessage::getAllMessage());
    // [['message' => 'Pretend you are a ninja', 'emoji' => 'πŸ₯·πŸ»β€'],...]

Include Custom Messages

    $customMessage = Message::newMessage('Fork this repo', '🍴');
    $secondCustomMessage = Message::newMessage('Make a PR', 'πŸ‘©β€πŸ’»');
    
    # single message
    RandomWaitMessage::getMessageString($includeEmoji = true, $customMessage, $secondCustomMessage...);
    
    # single message array
    RandomWaitMessage::getMessageArray($customMessage, $secondCustomMessage...);
    
    # all messages
    RandomWaitMessage::getAllMessage($customMessage, $secondCustomMessage...)