erpk/orders

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

Generator of orders button used in articles on eRepublik.

dev-master 2015-01-02 22:44 UTC

README

Install with Composer:

{
    "minimum-stability": "dev",
    "require": {
        "erpk/orders": "dev-master"
    }
}

Example of use:

<?php
require __DIR__.'/vendor/autoload.php';

use Erpk\Orders\Button;

$btn = new Button;
$btn->set('titleText', 'Northern Cyprus');
$btn->set('theme', 'blue');
$btn->set('signature', false);
$btn->set('fontSize', 30);
$btn->set('captionText', 'Fight for Resistance');
$btn->set('priority', 4);
$btn->set('priorityLabel', 'Battle priority:');
$btn->generate();
$btn->save();

Result in browser:

alt

Also, you can save button as file:

$btn->save('/var/files/button.png');

Or save as base64 encoded string:

$image = $btn->saveBase64();