Yoast\WP\Lib

Abstract_Main::__get()publicYoast 1.0

Magic getter for retrieving a property from a surface.

Метод класса: Abstract_Main{}

Хуков нет.

Возвращает

Разное. The value of the property.

Использование

$Abstract_Main = new Abstract_Main();
$Abstract_Main->__get( $property );
$property(строка) (обязательный)
The property to retrieve.

Код Abstract_Main::__get() Yoast 20.0

public function __get( $property ) {
	if ( \array_key_exists( $property, $this->cached_surfaces ) ) {
		return $this->cached_surfaces[ $property ];
	}

	$surfaces = $this->get_surfaces();

	if ( isset( $surfaces[ $property ] ) ) {
		$this->cached_surfaces[ $property ] = $this->container->get( $surfaces[ $property ] );

		return $this->cached_surfaces[ $property ];
	}
	throw new Exception( sprintf( 'Property $%s does not exist.', $property ) );
}