Exemplo n.º 1
0
 /**
  * Gets that player
  *
  * @param $output
  *
  * @return array|null
  */
 private function FindPlayer($output = FORMAT_PRETTY)
 {
     if ($this->post == null) {
         throw new UserException("Result is unidentified");
     }
     $result = $this->post->Send();
     if ($result == null) {
         throw new UserException("Result is unidentified");
     }
     $array = KeyConverter::Convert($result);
     if ($output == FORMAT_PRETTY) {
         //return $this->FormatResult( $array );
     }
     return $array;
 }
Exemplo n.º 2
0
 /**
  * Sends the post request and returns the trades
  *
  * @param $output
  *
  * @return array|null
  */
 private function SearchTrades($output = FORMAT_PRETTY)
 {
     if ($this->post == null) {
         throw new TradeException("Result is unidentified");
     }
     $result = $this->post->Send();
     if ($result == null) {
         throw new TradeException("Result is unidentified");
     }
     $array = KeyConverter::Convert($result);
     if ($output == FORMAT_PRETTY) {
         return $this->FormatResult($array);
     }
     return $array;
 }