? LICENSE.txt
? krumo.patch
Index: entity_metadata/entity_metadata.wrapper.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity/entity_metadata/Attic/entity_metadata.wrapper.inc,v
retrieving revision 1.1.2.44
diff -u -p -r1.1.2.44 entity_metadata.wrapper.inc
--- entity_metadata/entity_metadata.wrapper.inc	22 Sep 2010 11:11:01 -0000	1.1.2.44
+++ entity_metadata/entity_metadata.wrapper.inc	29 Sep 2010 00:11:11 -0000
@@ -287,6 +287,9 @@ class EntityStructureWrapper extends Ent
     if (!isset($name)) {
       return $this->propertyInfo['properties'];
     }
+    if (strpos($name, 'krumo') === 0) {
+      return array();
+    }
     if (!isset($this->propertyInfo['properties'][$name])) {
       throw new EntityMetadataWrapperException('Unknown data property ' . check_plain($name) . '.');
     }
@@ -341,6 +344,9 @@ class EntityStructureWrapper extends Ent
    *   An instance of EntityMetadataWrapper.
    */
   public function get($name) {
+    if (strpos($name, 'krumo') === 0) {
+      return entity_metadata_wrapper('integer', 0, array('parent' => $this, 'name' => $name, 'langcode' => $this->langcode));
+    }
     // Look it up in the cache if possible.
     if (!array_key_exists($name, $this->cache)) {
       if ($info = $this->getPropertyInfo($name)) {
@@ -358,7 +364,12 @@ class EntityStructureWrapper extends Ent
    * Magic method: Get a wrapper for a property.
    */
   public function __get($name) {
-    return $this->get($name);
+    $get = $this->get($name);
+    // Krumo expects that this can be casted to an int.
+    if (strpos($name, 'krumo') === 0) {
+      return $get->value();
+    }
+    return $get;
   }
 
   /**
@@ -394,6 +405,10 @@ class EntityStructureWrapper extends Ent
    * Sets a property.
    */
   protected function setProperty($name, $value) {
+    if (strpos($name, 'krumo') === 0) {
+      $this->$name = $value;
+      return;
+    }
     $info = $this->getPropertyInfo($name);
     if (!empty($info['setter callback']) && $this->dataAvailable()) {
       $info['setter callback']($this->value(), $name, $value, $this->langcode, $this->type);
