protected function _comparator($dataOrigin, $dataCheck, $operator)
    {
        switch ($operator) {
            case '===':
                return $dataOrigin === $dataCheck;
            // no break, always will return boolean value

            case '!==':
                return $dataOrigin !== $dataCheck;
            // no break, always will return boolean value

            case '==':
                return $dataOrigin == $dataCheck;
            // no break, always will return boolean value

            case '!=':
            case '<>':
                return $dataOrigin != $dataCheck;
            // no break, always will return boolean value

            case '<':
                return $dataOrigin < $dataCheck;
            // no break, always will return boolean value

            case '>':
                return $dataOrigin > $dataCheck;
            // no break, always will return boolean value

            case '<=':
                return $dataOrigin <= $dataCheck;
            // no break, always will return boolean value

            case '>=':
                return $dataOrigin >= $dataCheck;
            // no break, always will return boolean value

            default:
                return null;
            // no break, always will return boolean value
        }
    }
protected function _comparator($dataOrigin, $dataCheck, $operator)
    {
        switch ($operator) {
            case '===':
                return $dataOrigin === $dataCheck;
            // no break, always will return boolean value

            case '!==':
                return $dataOrigin !== $dataCheck;
            // no break, always will return boolean value

            case '==':
                return $dataOrigin == $dataCheck;
            // no break, always will return boolean value

            case '!=':
            case '<>':
                return $dataOrigin != $dataCheck;
            // no break, always will return boolean value

            case '<':
                return $dataOrigin < $dataCheck;
            // no break, always will return boolean value

            case '>':
                return $dataOrigin > $dataCheck;
            // no break, always will return boolean value

            case '<=':
                return $dataOrigin <= $dataCheck;
            // no break, always will return boolean value

            case '>=':
                return $dataOrigin >= $dataCheck;
            // no break, always will return boolean value

            default:
                return null;
            // no break, always will return boolean value
        }
    }
protected function _comparator ( $ dataOrigin , $ dataCheck , $ operator ) { switch ( $ operator ) { case '===' : return $ dataOrigin === $ dataCheck ; // no break, always will return boolean value case '!==' : return $ dataOrigin !== $ dataCheck ; // no break, always will return boolean value case '==' : return $ dataOrigin == $ dataCheck ; // no break, always will return boolean value case '!=' : case '<>' : return $ dataOrigin != $ dataCheck ; // no break, always will return boolean value case '<' : return $ dataOrigin < $ dataCheck ; // no break, always will return boolean value case '>' : return $ dataOrigin > $ dataCheck ; // no break, always will return boolean value case '<=' : return $ dataOrigin <= $ dataCheck ; // no break, always will return boolean value case '>=' : return $ dataOrigin >= $ dataCheck ; // no break, always will return boolean value default : return null ; // no break, always will return boolean value } }
allow to compare data with given operator

@param mixed $dataOrigin
@param mixed $dataCheck
@param string $operator
@return bool|null
allow to compare data with given operator