You appear to be a bot. Output may be restricted
Description
Magic getter for lazy loading of generate functions.
Usage
$mixed = Abstract_Presentation::__get( $name );
Parameters
- $name
- ( string ) required – The property to get.
Returns
mixed The value if it could be generated.
Source
File name: wordpress-seo/src/presentations/abstract-presentation.php
Lines:
1 to 11 of 11
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." ); }