You are here

function entity_property_getter_method in Entity API 7

Gets the property using the getter method (named just like the property).

1 call to entity_property_getter_method()
entity_metadata_getter_method in includes/entity.property.inc
Deprecated. Do not make use of this function, instead use the new one.

File

includes/entity.property.inc, line 431
Provides API functions around hook_entity_property_info(). Also see entity.info.inc, which cares for providing entity property info for all core entity types.

Code

function entity_property_getter_method($object, array $options, $name) {

  // Remove any underscores as classes are expected to use CamelCase.
  $method = strtr($name, array(
    '_' => '',
  ));
  return $object
    ->{$method}();
}