*
* @param string $body HTML document to parse
*
- * @return array Array of key-value pairs, probably with "type", "network" and
- * "signal strength"
+ * @return array Array of key-value pairs, probably with
+ * - "type"
+ * - "network"
+ * - "signal strength"
*/
public function index_wstatus1($body)
{
public function index_wstatus2($body)
{
preg_match('/var status2 = "(.+)"/', $body, $arMatches);
+ if (!isset($arMatches[1])) {
+ return array();
+ }
$strStatus = $arMatches[1];
//Connecting
*
* @param string $body HTML document to parse
*
- * @return array FIXME
+ * @return array Array of key-value pairs with the following keys:
+ * - type
+ * - network
+ * - signal strength
+ * - connection time
+ * - session usage (array)
+ * - card model
+ * - card revision
+ * - card firmware
+ * - IMSI
+ *
+ * @todo FIXME implement "connection" value as index_wstatus2() does it
*/
public function status_noauth($body)
{