PHP code example of softcreatr / weakauras-decoder

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

    

softcreatr / weakauras-decoder example snippets




oftCreatR\WeakAuras\Decoder;

$export = trim(file_get_contents('aura.txt'));
$envelope = Decoder::decode($export);

echo $envelope['s'];                // WeakAuras addon version
echo $envelope['d']['id'];          // Root display name
$children = $envelope['c'] ?? [];  // Grouped displays, if present

$currentFormat = Decoder::convert($export); // !WA:2!...

$table = Decoder::decodeLossless($export);
$display = $table->get('d');
$roundTrip = Decoder::encode($table);