-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
1,271 additions
and
1,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Changes | ||
======= | ||
|
||
JAXL introduces changes that affects on backward compatibility: | ||
|
||
v3.1.0 | ||
|
||
* JAXL now use autoloader from Composer, so no more `require_once 'jaxl.php'`. | ||
* Sources moves to subfolder `src/JAXL`, class JAXLCtl goes from `jaxlctl` | ||
to `src/JAXL/jaxlctl.php`, class HTTPDispathRule goes from `http_dispatcher.php` | ||
to `src/JAXL/http_dispatch_rule.php`. | ||
* Class names XEP_* drops underscores and changed to XEP* to conform PSR-2. | ||
* All config parameters of JAXL sets on instantiation to their default values, | ||
previously used code like `isset(JAXL->cfg['some-parameter'])` not need | ||
`isset` anymore. | ||
* Globally defined log functions drops their underscores and moves | ||
to JAXLLogger, _colorize renamed to JAXLLogger::cliLog. | ||
* JAXLXml->childrens fixed to children. | ||
* Some methods now in camel case format (i.e. JAXL->require_xep => JAXL->requireXep). | ||
* All constants now in upper case format (i.e. JAXL::version => JAXL::VERSION). | ||
* Renaming of methods that starts with _ prefix, they only used in private API | ||
and shouldn't affect you. | ||
* JAXL_CWD not used anymore and changed to getcwd(). | ||
* Move JAXL_MULTI_CLIENT to "multi_client" config parameter. | ||
* Globally defined NS_* now moves to XEPs constants. File xmpp_nss.php was | ||
renamed to xmpp.php, so use XMPP::NS_*. | ||
* JAXL_ERROR and other log levels goes to JAXLLogger::ERROR constant and so on. | ||
* HTTP_CRLF and other HTTP_* codes goes to HTTPServer::HTTP_* constants. | ||
* JAXLEvent->reg is not public property anymore, but you can get | ||
it with JAXLEvent->getRegistry() | ||
* In JAXLXml::construct first argument $name is required. | ||
* JAXL->add_exception_handlers moves to JAXLException::addHandlers. | ||
* If some of your applications watch for debug message that starts with | ||
"active read fds: " then you've warned about new message format | ||
"Watch: active read fds: " and "Unwatch: active read fds: ". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ include ``jaxl.php`` and initialize a new ``JAXL`` instance: | |
|
||
.. code-block:: ruby | ||
require 'jaxl.php'; | ||
$client = new JAXL(array( | ||
'jid' => '[email protected]', | ||
'pass' => 'password' | ||
|
@@ -43,7 +42,7 @@ Next we need to register callbacks on events of interest using ``JAXL::add_cb/2` | |
function on_disconnect_callback() | ||
{ | ||
_debug("got on_disconnect cb"); | ||
JAXLLogger::debug("got on_disconnect cb"); | ||
} | ||
$client->add_cb('on_disconnect', 'on_disconnect_callback'); | ||
|
@@ -85,7 +84,6 @@ pass additional parameters to ``JAXL`` constructor: | |
|
||
.. code-block:: ruby | ||
require 'jaxl.php'; | ||
$client = new JAXL(array( | ||
'jid' => '[email protected]', | ||
'pass' => 'password', | ||
|
@@ -103,7 +101,6 @@ parameter as shown below: | |
|
||
.. code-block:: ruby | ||
require_once 'jaxl.php'; | ||
$comp = new JAXL(array( | ||
// (required) component host and secret | ||
'jid' => $argv[1], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Bootstrap for examples. | ||
*/ | ||
|
||
error_reporting(E_ALL | E_STRICT); | ||
|
||
if (PHP_SAPI !== 'cli') { | ||
echo 'Warning: script should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL; | ||
} | ||
|
||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
foreach (array( | ||
dirname(__FILE__) . '/../../autoload.php', | ||
dirname(__FILE__) . '/../vendor/autoload.php', | ||
dirname(__FILE__) . '/vendor/autoload.php' | ||
) as $file) { | ||
if (file_exists($file)) { | ||
require $file; | ||
break; | ||
} | ||
} | ||
unset($file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.