Email_Abstract::__get( string $name )

Getter to access dynamic properties.


Parameters

$name

(string) (Required) The name of the property.


Top ↑

Return

(mixed|null) null if the value does not exists mixed otherwise the the value to the dynamic property.


Top ↑

Source

File: src/Tickets/Emails/Email_Abstract.php

	public function __get( $name ) {

		if ( array_key_exists( $name, $this->data ) ) {
			// Try to find a method on this instance, for example `get_subject()`.
			$method = 'get_' . strtolower( $name );

			if ( method_exists( $this, $method ) ) {
				return $this->{$method}();
			}

			return $this->data[ $name ];
		}

		return null;
	}

Top ↑

Changelog

Changelog
Version Description
5.5.10 Introduced.