@@ 423-441 (lines=19) @@ | ||
420 | * @since 4.9.72.p |
|
421 | * @throws RestException |
|
422 | */ |
|
423 | private function assertSimplifiedSpecifiedOperator() |
|
424 | { |
|
425 | if (!$this->valueIsSimplifiedSpecifiedOperator() && EED_Core_Rest_Api::debugMode()) { |
|
426 | throw new RestException( |
|
427 | 'numerically_indexed_array_of_values_only', |
|
428 | sprintf( |
|
429 | /* translators: 1: variable name*/ |
|
430 | esc_html__( |
|
431 | 'The array provided for the parameter "%1$s" should be numerically indexed.', |
|
432 | 'event_espresso' |
|
433 | ), |
|
434 | $this->getQueryParamKey() |
|
435 | ), |
|
436 | array( |
|
437 | 'status' => 400, |
|
438 | ) |
|
439 | ); |
|
440 | } |
|
441 | } |
|
442 | ||
443 | /** |
|
444 | * If query_param_value were in the simplified specific operator structure, change it into the legacy structure. |
|
@@ 617-636 (lines=20) @@ | ||
614 | * @since 4.9.72.p |
|
615 | * @throws RestException |
|
616 | */ |
|
617 | private function throwInvalidOperatorExceptionIfDebugging() |
|
618 | { |
|
619 | // so they didn't provide a valid operator |
|
620 | if (EED_Core_Rest_Api::debugMode()) { |
|
621 | throw new RestException( |
|
622 | 'invalid_operator', |
|
623 | sprintf( |
|
624 | esc_html__( |
|
625 | 'You provided an invalid parameter, with key "%1$s" and value "%2$s"', |
|
626 | 'event_espresso' |
|
627 | ), |
|
628 | $this->getQueryParamKey(), |
|
629 | $this->getQueryParamValue() |
|
630 | ), |
|
631 | array( |
|
632 | 'status' => 400, |
|
633 | ) |
|
634 | ); |
|
635 | } |
|
636 | } |
|
637 | ||
638 | /** |
|
639 | * Returns true if the query_param_key was a logic query parameter, eg `OR`, `AND`, `NOT`, `OR*`, etc. |