+ throw new Exception(
+ 'HTTP Error: ' . $nStatus . ' ' . $resp->getReasonPhrase()
+ );
+ }
+
+
+
+ /**
+ * Retrieves pc card/SIM status information
+ *
+ * @return array Array with several key-value pairs
+ * connection => connecting, disconnected, connected
+ *
+ * @throws Exception When the router can't be reached
+ */
+ public function getCardStatus()
+ {
+ $arRetval = $this->loadStatus_NoAuth();
+
+ return array_intersect_key(
+ $arRetval,
+ array(
+ 'card model' => 0,
+ 'card revision' => 0,
+ 'card firmware' => 0,
+ 'IMSI' => 0
+ )
+ );
+ }
+
+
+
+ /**
+ * Retrieves all status information one can get.
+ *
+ * @return array Array with several key-value pairs
+ * connection => connecting, disconnected, connected
+ *
+ * @throws Exception When the router can't be reached
+ */
+ public function getFullStatus()
+ {
+ return $this->loadStatus_NoAuth();
+ }
+
+
+
+ /**
+ * Log a message to stdout.
+ *
+ * @param string|object $msg Message to display. May even be a response
+ * object
+ * @param integer $level Log level, see $verbosity
+ *
+ * @return void
+ */
+ public function log($msg, $level = 1)
+ {
+ if ($this->verbosity >= $level) {
+ echo $msg . "\n";
+ }