src/POData/UriProcessor/QueryProcessor/OrderByParser/OrderByParser.php
/**
     * Generates top level comparison function from sub comparison functions.
     * 
     * @return void
     */
Generates top level comparison function from sub comparison functions.

@return void
Generates top level comparison function from sub comparison functions . @return void
private function _generateTopLevelComparisonFunction()
    {
        $comparisonFunctionCount = count($this->_comparisonFunctions);
        $this->_assertion($comparisonFunctionCount > 0);
        $parameters = $this->_comparisonFunctions[0]->getParameters();
        if ($comparisonFunctionCount == 1) {
            $this->_topLevelComparisonFunction = $this->_comparisonFunctions[0];
        } else {
            $code = null;
            for ($i = 0; $i < $comparisonFunctionCount; $i++) {
                $subComparisonFunctionName = substr($this->_comparisonFunctions[$i]->getReference(), 1);
                $code .= "\$result = call_user_func_array(chr(0) . '$subComparisonFunctionName', array($parameters[0], $parameters[1]));";
                $code .= "
                         if (\$result != 0) {
                            return \$result;
                         }
                         ";
            }
            $code .= "return \$result;";
            $this->_topLevelComparisonFunction = new AnonymousFunction($parameters, $code);
        }        
    }
private function _generateTopLevelComparisonFunction ( ) { $ comparisonFunctionCount = count ( $ this -> _comparisonFunctions ) ; $ this -> _assertion ( $ comparisonFunctionCount > 0 ) ; $ parameters = $ this -> _comparisonFunctions [ 0 ] -> getParameters ( ) ; if ( $ comparisonFunctionCount == 1 ) { $ this -> _topLevelComparisonFunction = $ this -> _comparisonFunctions [ 0 ] ; } else { $ code = null ; for ( $ i = 0 ; $ i < $ comparisonFunctionCount ; $ i ++ ) { $ subComparisonFunctionName = substr ( $ this -> _comparisonFunctions [ $ i ] -> getReference ( ) , 1 ) ; $ code .= " \$ result = call_user_func_array(chr(0) . ' $ subComparisonFunctionName ', array( $ parameters [ 0 ] ,  $ parameters [ 1 ] )); " ; $ code .= " 
                         if ( \$ result != 0) {
                            return  \$ result;
                         }
                          " ; } $ code .= " return  \$ result; " ; $ this -> _topLevelComparisonFunction = new AnonymousFunction ( $ parameters , $ code ) ; } }
Generates top level comparison function from sub comparison functions.
Generates top level comparison function from sub comparison functions .
//$parameters[] = '&$matchLevel = 0';