Skip generating static list of API calls, just send them to the API.
[plcapi.git] / php / plc_api.php
similarity index 95%
rename from php/header.php
rename to php/plc_api.php
index 54f9b1e..cb7257a 100644 (file)
@@ -201,3 +201,17 @@ class PLCAPI
   // PLCAPI Methods
   //
 
+  function __call($name, $args)
+  {
+     array_unshift($args, $this->auth);
+     return $this->call($name, $args);
+  }
+}
+
+global $adm;
+
+$adm = new PLCAPI(array('AuthMethod' => "capability",
+                       'Username' => PLC_API_MAINTENANCE_USER,
+                       'AuthString' => PLC_API_MAINTENANCE_PASSWORD));
+
+?>