public function ResultRow::__get in Search API 8
Implements the magic __wakeup() method to lazy-load certain properties.
File
- src/
Plugin/ views/ ResultRow.php, line 77
Class
- ResultRow
- A class representing a result row of a Search API-based view.
Namespace
Drupal\search_api\Plugin\viewsCode
public function __get($name) {
$properties = get_object_vars($this);
if (array_key_exists($name, $properties)) {
return $properties[$name];
}
if (isset(static::$lazyLoad[$name]) && $this->_item) {
$method = static::$lazyLoad[$name];
return $this->_item
->{$method}();
}
$class = get_class($this);
trigger_error("Undefined property: {$class}::\${$name}");
return NULL;
}