Yoast\WP\SEO\Presentations
Abstract_Presentation::__get()
Magic getter for lazy loading of generate functions.
Метод класса: Abstract_Presentation{}
Хуков нет.
Возвращает
Разное
. The value if it could be generated.
Использование
$Abstract_Presentation = new Abstract_Presentation(); $Abstract_Presentation->__get( $name );
- $name(строка) (обязательный)
- The property to get.
Код Abstract_Presentation::__get() Abstract Presentation:: get Yoast 24.4
public function __get( $name ) { if ( $this->is_prototype() ) { throw new Exception( 'Attempting property access on prototype presentation. Use Presentation::of( $data ) to get a model presentation.' ); } $generator = "generate_$name"; if ( \method_exists( $this, $generator ) ) { $this->{$name} = $this->$generator(); return $this->{$name}; } throw new Exception( "Property $name has no generator. Expected function $generator." ); }