示例#1
0
 /**
  * @covers \Cougar\Util\QueryParameter::fromUri
  */
 public function testToHtmlSingleMultipleOperators()
 {
     $query = "this=that&blue!=green|red>=circle";
     $parameters = QueryParameter::fromUri("? " . $query);
     $this->assertEquals($query, QueryParameter::toHtml($parameters));
 }
示例#2
0
 /**
  * Returns the parsed GET query as a list of QueryParameters.
  *
  * @history
  * 2013.09.30:
  *   (AT)  Initial release
  *
  * @version 2013.09.30
  * @author (AT) Alberto Trevino, Brigham Young Univ. <*****@*****.**>
  * 
  * @return array List of QueryParameters with query information
  */
 public function getQuery()
 {
     # See if we have parsed the query
     if ($this->queryParameters === null) {
         # Parse the query
         $this->queryParameters = QueryParameter::fromUri(parse_url($_SERVER["REQUEST_URI"], PHP_URL_QUERY));
     }
     # Return the list of parsed query parameters
     return $this->queryParameters;
 }