26 if ( !class_exists( $class ) ) {
27 $checkedClasses[] = $class;
29 $class = __NAMESPACE__ .
'\\' . $class;
32 if ( !class_exists( $class ) ) {
33 $checkedClasses[] = $class;
34 throw new InvalidArgumentException(
35 'Could not find InsertableSuggester with class: ' . implode(
', ', $checkedClasses )
39 $suggester =
new $class( $params );
40 if ( !$suggester instanceof InsertablesSuggester ) {
41 throw new InvalidArgumentException(
42 "$class does not implement the InsertableSuggester interface"