getOperator() public méthode

Returns the operator
public getOperator ( ) : object
Résultat object of type Operator
Exemple #1
0
 /**
  * Processes a paremeter (condition) coming from template tags.
  *
  * @param array $p_param
  *      The array of parameters
  *
  * @return array $comparisonOperation
  *      The array containing processed values of the condition
  */
 private static function ProcessListParameters(ComparisonOperation $p_param)
 {
     $comparisonOperation = array();
     $comparisonOperation['left'] = PollsList::$s_parameters[strtolower($p_param->getLeftOperand())]['field'];
     if (isset($comparisonOperation['left'])) {
         $operatorObj = $p_param->getOperator();
         $comparisonOperation['right'] = $p_param->getRightOperand();
         $comparisonOperation['symbol'] = $operatorObj->getSymbol('sql');
     }
     return $comparisonOperation;
 }
 /**
  * Processes a paremeter (condition) coming from template tags.
  *
  * @param array $p_param
  *      The array of parameters
  *
  * @return array $comparisonOperation
  *      The array containing processed values of the condition
  */
 private static function ProcessListParameters(ComparisonOperation $p_param)
 {
     $comparisonOperation = array();
     switch (strtolower($p_param->getLeftOperand())) {
         case 'debate_nr':
             $comparisonOperation['left'] = 'debate_nr';
             break;
         case 'debateanswer_nr':
             $comparisonOperation['left'] = 'debateanswer_nr';
             break;
     }
     if (isset($comparisonOperation['left'])) {
         $operatorObj = $p_param->getOperator();
         $comparisonOperation['right'] = $p_param->getRightOperand();
         $comparisonOperation['symbol'] = $operatorObj->getSymbol('sql');
     }
     return $comparisonOperation;
 }
Exemple #3
0
    /**
     * Processes a paremeter (condition) coming from template tags.
     *
     * @param array $p_param
     *      The array of parameters
     *
     * @return array $comparisonOperation
     *      The array containing processed values of the condition
     */
    private static function ProcessListParameters(ComparisonOperation $p_param)
    {
        $comparisonOperation = array();

        switch (strtolower($p_param->getLeftOperand())) {
            case 'fk_poll_nr':
                $comparisonOperation['left'] = 'fk_poll_nr';
            break;
            case 'fk_language_id':
                $comparisonOperation['left'] = 'fk_language_id';
            break;
            case 'onhitlist':
                $comparisonOperation['left'] = 'on_hitlist';
            break;
        }

        if (isset($comparisonOperation['left'])) {
            $operatorObj = $p_param->getOperator();
            $comparisonOperation['right'] = $p_param->getRightOperand();
            $comparisonOperation['symbol'] = $operatorObj->getSymbol('sql');
        }

        return $comparisonOperation;
    } // fn ProcessListParameters