LLMS_Quiz_Attempt::__construct( mixed $item = null )

Constructor


Parameters Parameters

$item

(mixed) (Optional) Array/obj of attempt data or int. Default null.

Default value: null


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/models/model.llms.quiz.attempt.php

	public function __construct( $item = null ) {

		if ( is_numeric( $item ) ) {

			$this->id = $item;

		} elseif ( is_object( $item ) && isset( $item->id ) ) {

			$this->id = $item->id;

		} elseif ( is_array( $item ) && isset( $item['id'] ) ) {

			$this->id = $item['id'];

		}

		if ( ! $this->id ) {

			if ( is_array( $item ) || is_object( $item ) ) {
				$this->setup( $item );
			}

			parent::__construct();

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.9.0
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.