Пример #1
0
 public function addNode($name, $host, $port, $password, $directory, $OS)
 {
     $nodeArray = array("Name" => $name, "Host" => $host, "Port" => $port, "Password" => $password, "Directory" => $directory, "OS" => $OS);
     $dataPoster = new Data_Poster();
     $data = $dataPoster->postData($this->Interface, $nodeArray);
     return $data;
 }
Пример #2
0
 public function fetchNewToken($tokenType)
 {
     $dataPoster = new Data_Poster();
     $entityData = $dataPoster->postData($this->Interface, array("Type" => $tokenType));
     $entity = new TokensEntity();
     if ($entityData['status'] == 201) {
         $entity->exchangeArray($entityData['results']);
     }
     return $entity;
 }
Пример #3
0
 public function addApplicationSupport(ApplicationSupportedEntity $supportedServerEntity = null)
 {
     $dataPoster = new Data_Poster();
     $postParams = array();
     if ($supportedServerEntity instanceof ApplicationSupportedEntity) {
         $postParams = $supportedServerEntity->getArrayCopy();
     }
     $data = $dataPoster->postData($this->Interface, $postParams);
     return $data;
 }
Пример #4
0
 public function addServer($name, $host, $node, $owner, $app_id)
 {
     $nodeArray = array("Name" => $name, "Host" => $host, "Owner" => $owner, "App_ID" => $app_id, "Node" => $node);
     $dataPoster = new Data_Poster();
     $data = $dataPoster->postData($this->Interface, $nodeArray);
     print_r($data);
     $entity = new ServersEntity();
     if (isset($data['results'])) {
         $entity->exchangeArray($data['results']);
     }
     return $entity;
 }
Пример #5
0
 public function addMember($Username, $Email_Address, $Password)
 {
     $dataPoster = new Data_Poster();
     $data = $dataPoster->postData($this->Interface, array("Username" => $Username, "Email_Address" => $Email_Address, "Password" => $Password));
     if ($data['status'] == 200) {
         return true;
     } else {
         return $data['msg'];
     }
 }
Пример #6
0
 public function addConfig($name, $value)
 {
     $dataPoster = new Data_Poster();
     $data = $dataPoster->postData($this->Interface, array("Name" => $name, "Value" => $value));
     return $data;
 }
Пример #7
0
 public function addStatus($data)
 {
     $dataPoster = new Data_Poster();
     $data = $dataPoster->postData($this->Interface, $data);
     return $data;
 }