PHP code example of abstract / core

1. Go to this page and download the library: Download abstract/core 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/ */

    

abstract / core example snippets



Armes\Armes;

$core = Armes::default();
$tree = $core->parseJson(<<<'JSON'
{"button":{"@":{"class":"primary"},"#":["Save"]}}
JSON);
echo $core->renderHtml($tree);
// <button class="primary">Save</button>

$tree = $core->parseJson(
    '{"Widget":{"@":{"value":{":ref":"./data.yaml::$[value]"}}}}',
    '/workspace/main.armes.json',
);
$session = $core->referenceSession($tree, [
    'loader' => new \Armes\Loader\MemorySourceLoader([
        '/workspace/data.yaml' => 'value: 7',
    ]),
]);
$snapshot = $session->resolve();