PHP code example of empathy-php / engine

1. Go to this page and download the library: Download empathy-php/engine library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

empathy-php / engine example snippets




mpathy\Engine\Components\{
    Form,
    Button
};

use function Empathy\Engine\Others\pre;

$form   = new Form;
$button = new Button ($form);

$form->caption = 'Example app';

$button->text = 'Click me!';
$button->bounds = [16, 16, 96, 32];

$button->on ('click', function ()
{
    pre ('Hello, World!');
});

$form->showDialog ();

composer 
json
{
    "scripts": {
        "empathy-run": "vendor/empathy-php/core/empathy.exe vendor/empathy-php/core/script.php"
    }
}