Getting Started¶
Requirements¶
No external component or library is required. You simply need a standard PHP installation to work with Jaxl.
Library has been developed and tested extensively on linux operating systems. But there is no reason why it should not work on other OS. File an issue if you face any glitches.
Install¶
Use Composer to install:
php composer.phar require “jaxl/jaxl=^3.1.0”
Then use autoloader in your application:
require dirname(__FILE__) . ‘/vendor/autoload.php’;
Library Structure¶
Jaxl library comprises of following packages:
jaxl-corecontains generic networking and eventing components
jaxl-xmppcontains xmpp rfc implementation
jaxl-xmpp-xepcontains various xmpp xep implementation
jaxl-httpcontains http rfc implementation
jaxl-docsthis documentation comes from this package
jaxl-teststest suites for all the above packages
Inside Jaxl everything that you will interact with will be an object which will emit events and callbacks which we will be able to catch in our applications for custom processing and routing. Listed below are a few main objects:
- Core Stack
JAXLLoopmain select loop
JAXLClocktimed job/callback dispatcher
JAXLEventevent registry and emitter
JAXLFsmgeneric finite state machine
JAXLSocketClientgeneric tcp/udp client
JAXLSocketServergeneric tcp/udp server
JAXLXmlStreamstreaming XML parser
JAXLXmlcustom XML object implementation
JAXLLoggerlogging facility
- XMPP Stack
XMPPStreambase xmpp rfc implementation
XMPPStanzaprovides easy access patterns over xmpp stanza (wraps
JAXLXml)
XMPPIqxmpp iq stanza object (extends
XMPPStanza)
XMPPMsgxmpp msg stanza object (extends
XMPPStanza)
XMPPPresxmpp pres stanza object (extends
XMPPStanza)
XMPPXepabstract xmpp extension (extended by XEP implementations)
XMPPJidxmpp jid object
- HTTP Stack
HTTPServerhttp server implementation
HTTPClienthttp client implementation
HTTPRequesthttp request object
HTTPResponsehttp response object
Questions, Bugs and Issues¶
If you have any questions kindly post them on google groups. Groups are the quickest way to get an answer to your questions which is actively monitored by core developers.
If you are facing a bug or issue, please report that it on github issue tracker. You can even contribute to the library if you already have fixed the bug.