You are here

public function EntityStructureWrapper::__set in Entity API 7

Magic method: Set a property.

File

includes/entity.wrapper.inc, line 445
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

public function __set($name, $value) {
  if (strpos($name, 'krumo') === 0) {

    // #914934 Ugly workaround to allow krumo to write its recursion property.
    // This is necessary to make dpm() work without throwing exceptions.
    $this->{$name} = $value;
  }
  else {
    $this
      ->get($name)
      ->set($value);
  }
}