corny-phoenix / fipa-sl
PHP Library for serializing FIPA SL messages.
0.1.4
2015-04-16 00:00 UTC
Requires
- php: >= 5.5
- doctrine/collections: 1.*
Requires (Dev)
- codeclimate/php-test-reporter: 0.1.2
- phpunit/phpunit: 3.7.*@stable
This package is not auto-updated.
Last update: 2024-03-16 14:41:10 UTC
README
Introduction
The Foundation for Intelligent Physical Agents (FIPA) is a group at IEEE which proposes a lot of standards in agent oriented software engineering (AOSE). One of those standards is the Semantic Language (SL) specification (FIPA00008).
This library adds serialization and unserialization support for SL-encoded objects.
Installation
Install it using Composer:
composer require corny-phoenix/fipa-sl 0.1.4
Basic Usage
<?php include('vendor/autoload.php'); use CornyPhoenix\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"