cybersai/ussd-menu

A bare Ussd Menu Builder for most use cases

v0.1.0 2020-03-07 15:28 UTC

This package is auto-updated.

Last update: 2024-05-04 23:52:44 UTC


README

Packagist Version Travis (.com) GitHub repo size GitHub

A bare Ussd Menu Object Oriented Builder for common use cases.

No Real Documentation for now, but for now you can read the tests.

include 'vendor/autoload.php';

use Cybersai\UssdMenu\UssdMenu;

echo UssdMenu::from('Raw Text') // Create a new Instance with that string
    ->lineBreak(2) // Append Double linebreak
    ->line('Here comes a list') // Append new text with linebreak
    ->listing(['Superman', 'Batman', 'IronMan']) // List array using default options
    ->lineBreak() // Append a linebreak
    ->text('Bye'); // Finally Append text;
// Output
Raw Text

Here comes a list
1.Superman
2.Batman
3.IronMan
Bye

Installation

composer require cybersai/ussd-menu