|
2 | 2 | <package version="2.1" xmlns="http://pear.php.net/dtd/package-2.1" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.1 http://pear.php.net/dtd/package-2.1.xsd">
|
3 | 3 | <name>PEAR2_Net_RouterOS</name>
|
4 | 4 | <channel>pear2.php.net</channel>
|
5 |
| - <summary>RouterOS API client implementation. |
6 |
| -</summary> |
| 5 | + <summary>RouterOS API client implementation.</summary> |
7 | 6 | <description>RouterOS is the flag product of the company MikroTik and is a powerful router software. One of its many abilities is to allow control over it via an API. This package provides a client for that API, in turn allowing you to use PHP to control RouterOS hosts.</description>
|
8 | 7 | <lead>
|
9 | 8 | <name>Vasil Rangelov</name>
|
10 | 9 | <user>boen_robot</user>
|
11 | 10 | <email>boen.robot@gmail.com</email>
|
12 | 11 | <active>yes</active>
|
13 | 12 | </lead>
|
14 |
| - <date>2013-10-26</date> |
15 |
| - <time>19:56:36</time> |
| 13 | + <date>2014-11-02</date> |
| 14 | + <time>07:37:22</time> |
16 | 15 | <version>
|
17 | 16 | <release>1.0.0b5</release>
|
18 | 17 | <api>1.0.0</api>
|
|
22 | 21 | <api>stable</api>
|
23 | 22 | </stability>
|
24 | 23 | <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL License 2.1</license>
|
25 |
| - <notes>Console and some overall improvements. |
| 24 | + <notes>Console, some overall improvements, including BREAKING CHANGES. |
26 | 25 |
|
27 | 26 | * The PHAR file is now also a console. When installed, the console is available from the executable "roscon".
|
| 27 | +* __BREAKING CHANGES:__ |
| 28 | + - Response::getArgument() is renamed to Response::getProperty() (Note: Request::getArgument() is still valid). Response::getArgument() is left issuing an E_USER_DEPRECATED notice, and will be removed in a later release. |
| 29 | + - Message::getAllArguments() is removed in favor of IteratorAggregate implementation that returns an ArrayObject. For most intents and purposes, you should be able to just search&replace "->getAllArguments()" with an empty string (that will implicitly call getIterator()). If you require the arguments as a "real" array, you can replace "->getAllArguments()" with "->getIterator()->getArrayCopy()". |
| 30 | + - Message::\_\_invoke() without arguments is now a shortcut for getTag() instead of getting all arguments. |
| 31 | + - Util::changeMenu() is now renamed to Util::setMenu() and always returns the Util object itself. |
| 32 | + - ResponseCollection::\_\_invoke() without arguments (or NULL) is now a shortcut for getting the iterator of the current response, instead of for seeking to the last response. Replace "()" with "(-1)" or "->end()" to achieve the old effect. |
| 33 | + - ResponseCollection::getLast() is removed. To get the last response, you can instead use array access (or offsetGet()) with "-1" as the offset. Or simply search&replace "->getLast()" with "->offsetGet(-1)". |
| 34 | + - ResponseCollection::getArgumentMap() is renamed to ResponseCollection::getPropertyMap(). |
| 35 | + - All Query::ACTION\_\* constants are renamed to Query::OP\_\*, and shortened (GREATHER_THAN is now GT, etc.). |
28 | 36 | * New Util methods:
|
29 |
| - - getall() |
30 |
| - - count() |
| 37 | + - getMenu() (serves the same purpose as previously Util::changeMenu() with an emptry string) |
| 38 | + - getAll() |
| 39 | + - count() (makes Util an implementation of Countable, reports the number of items at the current menu) |
31 | 40 | - prepareScript()
|
| 41 | + - appendScript() |
| 42 | +* Message now implements Countable, reporting the number of arguments (on COUNTER_NORMAL) or words (on COUNT_RECURSIVE). |
32 | 43 | * Util::get() now uses RouterOS' "get" command, unless it returns an empty !done response (as it does for RouterOS versions prior to 6.0), in which case it automatically fallbacks to a print with a query.
|
33 | 44 | * Util::escapeValue() and Util::parseValue() now support associative arrays (introduced in RouterOS 6.2).
|
| 45 | +* Util::escapeValue() now correctly converts DateTime objects to DateInterval objects relative to UNIX epoch time in UTC. Previously, the current time zone was used instead of UTC. |
34 | 46 | * Util::add() and Util::set()/Util::edit() now support flags as values with a numeric key.
|
35 |
| -* Util::changeMenu() now returns the Util object itself, except when you supply an empty string, when the current menu is returned (as before). |
| 47 | +* Util::filePutContents() now behaves correctly when the underlying Client has enabled streaming of responses and/or when the contents is in a stream. |
| 48 | +* Responses in ResponseCollection can now be getted or seeked to a value relative from the end by supplying a negative offset. |
36 | 49 | * ResponseCollection can now be searched by argument values, if you first designate an argument name with the new ResponseCollection::setIndex() method.
|
| 50 | +* ResponseCollection can now produce a sorted response collection based on user defined criteria using the new ResponseCollection::orderBy() method. |
| 51 | +* Util::find() now always returns a comma separated list when used without arguments (as opposed to ";" separated, in more recent RouterOS versions). |
| 52 | +* Response receiving now resets if an empty sentence is received, instead of throwing an exception. |
| 53 | +* New Communicator::seekableStreamLength() method, used internally by Util::filePutContents(). |
37 | 54 | * Doc fixes (Notably: Clarified the acceptability of seekable streams as argument values, which has been present for a long time, but never documented).
|
38 | 55 | * CS fixes.</notes>
|
39 | 56 | <contents>
|
|
64 | 81 | <file role="doc" name="sync-request-simple.php"/>
|
65 | 82 | </dir>
|
66 | 83 | <dir name="scripts" baseinstalldir="/">
|
| 84 | + <file role="script" name="roscon"> |
| 85 | + <tasks:replace type="package-info" to="version" from="GIT: $Id$"/> |
| 86 | + <tasks:replace type="package-info" to="summary" from="~~summary~~"/> |
| 87 | + <tasks:replace type="package-info" to="description" from="~~description~~"/> |
| 88 | + </file> |
67 | 89 | <file role="script" name="roscon.bat">
|
68 | 90 | <tasks:windowseol/>
|
69 | 91 | </file>
|
70 | 92 | <file role="script" name="roscon.php">
|
71 | 93 | <tasks:replace type="pear-config" to="php_dir" from="../src"/>
|
72 | 94 | <tasks:replace type="pear-config" to="php_dir" from="../../Net_Transmitter.git/src"/>
|
73 | 95 | <tasks:replace type="pear-config" to="php_dir" from="../../Console_Color.git/src"/>
|
| 96 | + <tasks:replace type="pear-config" to="php_dir" from="../../Console_CommandLine.git/src"/> |
74 | 97 | <tasks:replace type="pear-config" to="data_dir" from="@PEAR2_DATA_DIR@"/>
|
75 | 98 | <tasks:replace type="package-info" to="channel" from="@PACKAGE_CHANNEL@"/>
|
76 | 99 | <tasks:replace type="package-info" to="name" from="@PACKAGE_NAME@"/>
|
|
196 | 219 | <file role="test" name="Safe.php"/>
|
197 | 220 | <file role="test" name="Unsafe.php"/>
|
198 | 221 | </dir>
|
| 222 | + <dir name="Extra"> |
| 223 | + <file role="test" name="isHostnameInvalid.php"> |
| 224 | + <tasks:replace type="package-info" to="version" from="GIT: $Id$"/> |
| 225 | + </file> |
| 226 | + </dir> |
199 | 227 | <dir name="Util">
|
200 | 228 | <dir name="Safe">
|
201 | 229 | <dir name="NonPersistent">
|
|
235 | 263 | <file role="test" name="phpunit.xml">
|
236 | 264 | <tasks:replace type="pear-config" to="php_dir" from="../src"/>
|
237 | 265 | </file>
|
| 266 | + <file role="test" name="RouterOS_SETTINGS.rsc"/> |
238 | 267 | </dir>
|
239 | 268 | </dir>
|
240 | 269 | </contents>
|
|
249 | 278 | <package>
|
250 | 279 | <name>PEAR2_Net_Transmitter</name>
|
251 | 280 | <channel>pear2.php.net</channel>
|
252 |
| - <min>1.0.0a4</min> |
| 281 | + <min>1.0.0a5</min> |
253 | 282 | </package>
|
254 | 283 | <extension>
|
255 |
| - <name>PCRE</name> |
| 284 | + <name>pcre</name> |
256 | 285 | </extension>
|
257 | 286 | </required>
|
258 | 287 | <optional>
|
|
264 | 293 | <package>
|
265 | 294 | <name>PEAR2_Cache_SHM</name>
|
266 | 295 | <channel>pear2.php.net</channel>
|
267 |
| - <min>0.1.2</min> |
| 296 | + <min>0.1.3</min> |
| 297 | + </package> |
| 298 | + <package> |
| 299 | + <name>PEAR2_Console_CommandLine</name> |
| 300 | + <channel>pear2.php.net</channel> |
| 301 | + <min>0.2.1</min> |
| 302 | + </package> |
| 303 | + <package> |
| 304 | + <name>PEAR2_Console_Color</name> |
| 305 | + <channel>pear2.php.net</channel> |
| 306 | + <min>1.0.0</min> |
268 | 307 | </package>
|
269 | 308 | <extension>
|
270 | 309 | <name>iconv</name>
|
|
283 | 322 | <install name="examples/send-and-forget.php" as="examples/send-and-forget.php"/>
|
284 | 323 | <install name="examples/sync-request-arguments.php" as="examples/sync-request-arguments.php"/>
|
285 | 324 | <install name="examples/sync-request-simple.php" as="examples/sync-request-simple.php"/>
|
| 325 | + <install name="scripts/roscon" as="roscon"/> |
286 | 326 | <install name="scripts/roscon.bat" as="roscon.bat"/>
|
287 |
| - <install name="scripts/roscon.php" as="roscon"/> |
| 327 | + <install name="scripts/roscon.php" as="roscon.php"/> |
288 | 328 | <install name="src/PEAR2/Net/RouterOS/Client.php" as="PEAR2/Net/RouterOS/Client.php"/>
|
289 | 329 | <install name="src/PEAR2/Net/RouterOS/Communicator.php" as="PEAR2/Net/RouterOS/Communicator.php"/>
|
290 | 330 | <install name="src/PEAR2/Net/RouterOS/DataFlowException.php" as="PEAR2/Net/RouterOS/DataFlowException.php"/>
|
|
317 | 357 | <install name="tests/Client/Unsafe/Persistent/EncryptedTest.php" as="Client/Unsafe/Persistent/EncryptedTest.php"/>
|
318 | 358 | <install name="tests/Client/Unsafe/Persistent/UnencryptedTest.php" as="Client/Unsafe/Persistent/UnencryptedTest.php"/>
|
319 | 359 | <install name="tests/ConnectionTest.php" as="ConnectionTest.php"/>
|
| 360 | + <install name="tests/Extra/isHostnameInvalid.php" as="Extra/isHostnameInvalid.php"/> |
320 | 361 | <install name="tests/HandlingTest.php" as="HandlingTest.php"/>
|
321 | 362 | <install name="tests/phpunit.xml" as="phpunit.xml"/>
|
| 363 | + <install name="tests/RouterOS_SETTINGS.rsc" as="RouterOS_SETTINGS.rsc"/> |
322 | 364 | <install name="tests/Util/Safe.php" as="Util/Safe.php"/>
|
323 | 365 | <install name="tests/Util/Safe/NonPersistent/EncryptedTest.php" as="Util/Safe/NonPersistent/EncryptedTest.php"/>
|
324 | 366 | <install name="tests/Util/Safe/NonPersistent/UnencryptedTest.php" as="Util/Safe/NonPersistent/UnencryptedTest.php"/>
|
|
0 commit comments