public function EntityMetadataWrapper::raw in Entity API 7
Returns the raw, unprocessed data. Most times this is the same as returned by value(), however for already processed and sanitized textual data, this will return the unprocessed data in contrast to value().
File
- includes/
entity.wrapper.inc, line 96 - Provides wrappers allowing easy usage of the entity metadata.
Class
- EntityMetadataWrapper
- A common base class for all wrappers.
Code
public function raw() {
if (!$this
->dataAvailable()) {
throw new EntityMetadataWrapperException('Missing data values.');
}
if (isset($this->info['name']) && isset($this->info['parent'])) {
return $this->info['parent']
->getPropertyRaw($this->info['name'], $this->info);
}
// Else return the usual value, which should be raw in this case.
return $this
->value();
}