You are here

protected function EntityStructureWrapper::spotInfo in Entity API 7

May be used to lazy-load additional info about the data, depending on the concrete passed data.

4 calls to EntityStructureWrapper::spotInfo()
EntityDrupalWrapper::spotInfo in includes/entity.wrapper.inc
Used to lazy-load bundle info. So the wrapper can be loaded e.g. just for setting without the data being loaded.
EntityStructureWrapper::getIterator in includes/entity.wrapper.inc
EntityStructureWrapper::getPropertyInfo in includes/entity.wrapper.inc
Gets the info about the given property.
EntityStructureWrapper::__isset in includes/entity.wrapper.inc
Magic method: Can be used to check if a property is known.
1 method overrides EntityStructureWrapper::spotInfo()
EntityDrupalWrapper::spotInfo in includes/entity.wrapper.inc
Used to lazy-load bundle info. So the wrapper can be loaded e.g. just for setting without the data being loaded.

File

includes/entity.wrapper.inc, line 332
Provides wrappers allowing easy usage of the entity metadata.

Class

EntityStructureWrapper
Provides a general wrapper for any data structure. For this to work the metadata has to be passed during construction.

Code

protected function spotInfo() {

  // Apply the callback if set, such that the caller may alter the info.
  if (!empty($this->info['property info alter']) && !$this->propertyInfoAltered) {
    $this->propertyInfo = call_user_func($this->info['property info alter'], $this, $this->propertyInfo);
    $this->propertyInfoAltered = TRUE;
  }
}