@@ 680-690 (lines=11) @@ | ||
677 | // don't give up! you gotta... |
|
678 | try { |
|
679 | //does the file exist and can it be read ? |
|
680 | if ( ! $path ) { |
|
681 | // so sorry, can't find the file |
|
682 | throw new EE_Error ( |
|
683 | sprintf( |
|
684 | __( 'The %1$s file %2$s could not be located or is not readable due to file permissions. Please ensure that the following filepath(s) are correct: %3$s', 'event_espresso' ), |
|
685 | trim( $type, '.' ), |
|
686 | $class_name, |
|
687 | '<br />' . implode( ',<br />', $file_paths ) |
|
688 | ) |
|
689 | ); |
|
690 | } |
|
691 | // get the file |
|
692 | require_once( $path ); |
|
693 | // if the class isn't already declared somewhere |
@@ 3024-3026 (lines=3) @@ | ||
3021 | 'minimum', |
|
3022 | 'none' |
|
3023 | ); |
|
3024 | if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){ |
|
3025 | throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s", "event_espresso"),$use_default_where_conditions,implode(", ",$allowed_used_default_where_conditions_values))); |
|
3026 | } |
|
3027 | $universal_query_params = array(); |
|
3028 | if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){ |
|
3029 | $universal_query_params = $this->_get_default_where_conditions(); |
|
@@ 4920-4931 (lines=12) @@ | ||
4917 | */ |
|
4918 | static public function verify_is_valid_cap_context( $context ) { |
|
4919 | $valid_cap_contexts = EEM_Base::valid_cap_contexts(); |
|
4920 | if( in_array( $context, $valid_cap_contexts ) ) { |
|
4921 | return true; |
|
4922 | }else{ |
|
4923 | throw new EE_Error( |
|
4924 | sprintf( |
|
4925 | __( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ), |
|
4926 | $context, |
|
4927 | 'EEM_Base' , |
|
4928 | implode(',', $valid_cap_contexts ) |
|
4929 | ) |
|
4930 | ); |
|
4931 | } |
|
4932 | } |
|
4933 | ||
4934 | /** |