PHP code example of corny-phoenix / fipa-sl
1. Go to this page and download the library: Download corny-phoenix/fipa-sl 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/ */
corny-phoenix / fipa-sl example snippets
ornyPhoenix\Fipa\Sl\Serializer\DefaultTupleSerializer;
use CornyPhoenix\Fipa\Sl\Context\DefaultTupleContext;
use CornyPhoenix\Fipa\Sl\Registry\DefaultTupleRegistry;
$registry = new DefaultTupleRegistry();
$context = DefaultTupleContext::getInstance();
$serializer = new DefaultTupleSerializer($context, $registry);
$frame = $serializer->unserialize('(frame "foo")');
var_dump($frame->getFrame()); // string(5) "frame"
var_dump($frame->getTerms()[0]->getValue()); // string(3) "foo"