@@ 147-150 (lines=4) @@ | ||
144 | // EEH_Debug_Tools::printr( $fieldValues, '$fieldValues <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
|
145 | // verify client code has not passed any invalid field names |
|
146 | foreach ($fieldValues as $field_name => $field_value) { |
|
147 | if ( ! isset($model_fields[$field_name])) { |
|
148 | throw new EE_Error(sprintf(__("Invalid field (%s) passed to constructor of %s. Allowed fields are :%s", |
|
149 | "event_espresso"), $field_name, get_class($this), implode(", ", array_keys($model_fields)))); |
|
150 | } |
|
151 | } |
|
152 | // EEH_Debug_Tools::printr( $model_fields, '$model_fields <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
|
153 | $this->_timezone = EEH_DTT_Helper::get_valid_timezone_string($timezone); |
@@ 4662-4672 (lines=11) @@ | ||
4659 | public function related_settings_for($relation_name) |
|
4660 | { |
|
4661 | $relatedModels = $this->relation_settings(); |
|
4662 | if (! array_key_exists($relation_name, $relatedModels)) { |
|
4663 | throw new EE_Error( |
|
4664 | sprintf( |
|
4665 | __('Cannot get %s related to %s. There is no model relation of that type. There is, however, %s...', |
|
4666 | 'event_espresso'), |
|
4667 | $relation_name, |
|
4668 | $this->_get_class_name(), |
|
4669 | implode(', ', array_keys($relatedModels)) |
|
4670 | ) |
|
4671 | ); |
|
4672 | } |
|
4673 | return $relatedModels[$relation_name]; |
|
4674 | } |
|
4675 |