searchWithOrderBy() public static method

public static searchWithOrderBy ( $object, $orderByField, $searchData, $queryData = [], $ascending = true, $limit = 1000, $page, $returnFields = false, Infusionsoft_App $app = null )
$app Infusionsoft_App
    $searchData = array($_REQUEST['searchFieldName'] => $_REQUEST['searchFieldData']);
    if ($_REQUEST['queryFieldData'] !== '') {
        $queryData = array($_REQUEST['queryFieldName'] => $_REQUEST['queryFieldData']);
    } else {
        $queryData = array();
    }
    if ($_REQUEST['ascending'] == "false") {
        $ascending = false;
    } elseif ($_REQUEST['ascending'] == "true") {
        $ascending = true;
    } else {
        $ascending = true;
    }
    if ($_REQUEST['limit'] == '') {
        $limit = 1000;
    } else {
        $limit = $_REQUEST['limit'];
    }
    if ($_REQUEST['page'] == '') {
        $page = 0;
    } else {
        $page = $_REQUEST['page'];
    }
    if ($_REQUEST['selectedFields'] == '') {
        $returnFields = false;
    } else {
        $returnFields = $_REQUEST['selectedFields'];
    }
    $out = Infusionsoft_DataService::searchWithOrderBy($object, $_REQUEST['orderBy'], $searchData, $queryData, $ascending, $limit, $page, $returnFields);
    var_dump($out);
}