learndash_cast_WpProQuiz_Model_AnswerTypes( object $instance,  string $className )

Casts an instance of PHP stdClass to the type of given class name.

Description #

This function will take an instance of a PHP stdClass and attempt to cast it to the type of the specified $className parameter. For example, we may pass ‘Acme\Model\Product’ as the $className.

Parameters #


(object) (Required) An instance of the stdClass to cast.


(string) (Required) The name of the class type to which we want to convert.

Return #

(mixed) The instance after casting.

Source #

File: includes/lib/wp-pro-quiz/wp-pro-quiz.php