public static function getInstance() { if (self::$instance == null) { self::$instance = new DeployRHttpTransport(); } return self::$instance; }
public function save(DeployRRObject $robject, $descr) { $content = $this->getDefaultContent(); $content .= "&name=" . urlencode($robject->getName()); $content .= "&descr=" . urlencode($descr); return $this->responseParser->parseSave(DeployRHttpTransport::getInstance()->send($this->serverUrl . '/r/session/object/save', 'POST', $this->getHeader(), $content), $robject->getName(), $descr); }
public function getScripts() { return $this->responseParser->parseGetScripts(DeployRHttpTransport::getInstance()->send($this->serverUrl . '/r/script/list', 'POST', $this->getHeader(), $this->getDefaultContent())); }
public function delete($id) { $content = $this->getDefaultContent(); $content .= "&id=" . $id; $this->responseParser->parseDelete(DeployRHttpTransport::getInstance()->send($this->serverUrl . '/r/repository/object/delete', 'POST', $this->getHeader(), $content)); }
public function autoSave() { return $this->responseParser->parseAutoSave(DeployRHttpTransport::getInstance()->send($this->serverUrl . '/r/user/autosave', 'POST', $this->getHeader(), $this->getDefaultContent())); }
public function saveWorkspace($descr) { $content = $this->getDefaultContent(); $content .= "&descr=" . urlencode($descr); return $this->responseParser->parseSaveWorkspace(DeployRHttpTransport::getInstance()->send($this->serverUrl . '/r/session/workspace/save', 'POST', $this->getHeader(), $content), $descr); }