Form::__get( string $property )

Magic getter.

Description

Returns a property value.

See also

Parameters

$property

(string) (Required) Property to get.

Return

(mixed) Property value, or null if property is not set.

Source

File: src/db-objects/forms/form.php

	public function __get( $property ) {
		switch ( $property ) {
			case 'id':
				return (int) $this->original->ID;
			case 'slug':
				return $this->original->post_name;
			case 'author':
				return (int) $this->original->post_author;
			case 'timestamp':
				return (int) strtotime( $this->original->post_date_gmt );
			case 'timestamp_modified':
				return (int) strtotime( $this->original->post_modified_gmt );
		}

		return parent::__get( $property );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.