Submission::__isset( string $property )

Magic isset-er.

Description

Checks whether a property is set.

See also

Parameters

$property

(string) (Required) Property to check for.

Return

(bool) True if the property is set, false otherwise.

Source

File: src/db-objects/submissions/submission.php

	public function __isset( $property ) {
		if ( 'values' === $property ) {
			return true;
		}

		if ( preg_match( '/^element_([0-9]+)_([a-z_]+)_value$/U', $property, $matches ) ) {
			$values = $this->get_element_values_data();

			if ( isset( $values[ $matches[1] ] ) && isset( $values[ $matches[1] ][ $matches[2] ] ) ) {
				return true;
			}

			return false;
		}

		return parent::__isset( $property );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.