public function setQuery($collectionName, $metaInfoQuery = null) { $argv = func_get_args(); if (count($argv) == 2) { $this->dbName = App42API::getDbName(); $this->collectionName = $collectionName; if ($metaInfoQuery instanceof JSONObject) { $queryObject = array(); array_push($queryObject, $metaInfoQuery); $this->query = json_encode($queryObject); } else { $this->query = json_encode($metaInfoQuery); } } else { $this->dbName = App42API::getDbName(); $this->collectionName = collectionName; } }
public function addJSONObject($collectionName, $obj) { $this->dbName = App42API::getDbName(); $this->collectionName = $collectionName; $this->jsonObject = json_encode($obj); }