| @@ 751-761 (lines=11) @@ | ||
| 748 | // don't give up! you gotta... |
|
| 749 | try { |
|
| 750 | //does the file exist and can it be read ? |
|
| 751 | if ( ! $path ) { |
|
| 752 | // so sorry, can't find the file |
|
| 753 | throw new EE_Error ( |
|
| 754 | sprintf( |
|
| 755 | __( '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' ), |
|
| 756 | trim( $type, '.' ), |
|
| 757 | $class_name, |
|
| 758 | '<br />' . implode( ',<br />', $file_paths ) |
|
| 759 | ) |
|
| 760 | ); |
|
| 761 | } |
|
| 762 | // get the file |
|
| 763 | require_once( $path ); |
|
| 764 | // if the class isn't already declared somewhere |
|
| @@ 3043-3045 (lines=3) @@ | ||
| 3040 | 'minimum', |
|
| 3041 | 'none' |
|
| 3042 | ); |
|
| 3043 | if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){ |
|
| 3044 | 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))); |
|
| 3045 | } |
|
| 3046 | $universal_query_params = array(); |
|
| 3047 | if( $use_default_where_conditions === 'all' || $use_default_where_conditions === 'this_model_only' ){ |
|
| 3048 | $universal_query_params = $this->_get_default_where_conditions(); |
|
| @@ 4963-4974 (lines=12) @@ | ||
| 4960 | */ |
|
| 4961 | static public function verify_is_valid_cap_context( $context ) { |
|
| 4962 | $valid_cap_contexts = EEM_Base::valid_cap_contexts(); |
|
| 4963 | if( in_array( $context, $valid_cap_contexts ) ) { |
|
| 4964 | return true; |
|
| 4965 | }else{ |
|
| 4966 | throw new EE_Error( |
|
| 4967 | sprintf( |
|
| 4968 | __( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ), |
|
| 4969 | $context, |
|
| 4970 | 'EEM_Base' , |
|
| 4971 | implode(',', $valid_cap_contexts ) |
|
| 4972 | ) |
|
| 4973 | ); |
|
| 4974 | } |
|
| 4975 | } |
|
| 4976 | ||
| 4977 | /** |
|