
Originally Posted by
semicolon143
Hi there,
Can you give us an example on how to use your cabal_msg reader support?
Thanks in advance.,
Convert cabal_msg.enc to cabal_msg.dec and then use the class CabalMsg getArray method to get the full content of the file. Do something like this after placing cabal_msg.dec in same folder as PHP code:
PHP Code:
<?php
require 'vendor/autoload.php';
$cabalMsgDecoder = new cyberinferno\Cabal\Helpers\FileSystem\Client\CabalMsg('cabal_msg.dec');
echo '<pre>' . print_r($cabalMsgDecoder->getArray(), true) . '</pre>';
If you can want only some info like item details then you can call getArray by sending top level key as parameter:
PHP Code:
$cabalMsgDecoder->getArray('item_msg');