@@ 208-211 (lines=4) @@ | ||
205 | ||
206 | $class = __NAMESPACE__ . '\\' . $type . '_Field'; |
|
207 | ||
208 | if ( ! class_exists( $class ) ) { |
|
209 | Incorrect_Syntax_Exception::raise( 'Unknown field "' . $type . '".' ); |
|
210 | $class = __NAMESPACE__ . '\\Broken_Field'; |
|
211 | } |
|
212 | ||
213 | $field = new $class( $type, $name, $label ); |
|
214 |
@@ 157-160 (lines=4) @@ | ||
154 | $normalized_type = Helper::normalize_type( $type ); |
|
155 | $class = Helper::type_to_class( $normalized_type, __NAMESPACE__, '_Container' ); |
|
156 | ||
157 | if ( ! class_exists( $class ) ) { |
|
158 | Incorrect_Syntax_Exception::raise( 'Unknown container "' . $type . '".' ); |
|
159 | $class = __NAMESPACE__ . '\\Broken_Container'; |
|
160 | } |
|
161 | ||
162 | $repository = App::resolve( 'container_repository' ); |
|
163 | $unique_id = $repository->get_unique_panel_id( $name ); |