original_string: public function getValue($object, FieldInterface $field)
      {
          try {
              switch (get_class($field)) {
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Property':
                      return $this->getPropertyValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Expression':
                      return $this->getExpressionValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Field':
                      return $this->getFieldValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Value':
                      return $field->getValue();
              }
          } catch (\Exception $e) {
              throw new \Exception(sprintf(
                  'Error encountered when trying to determine value from object "%s"',
                  get_class($object)
              ), null, $e);
          }
  
          throw new \RuntimeException(sprintf(
              'Unknown field type "%s" when trying to convert "%s" into a search document',
              get_class($field),
              get_class($object)
          ));
      }
code: public function getValue($object, FieldInterface $field)
      {
          try {
              switch (get_class($field)) {
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Property':
                      return $this->getPropertyValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Expression':
                      return $this->getExpressionValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Field':
                      return $this->getFieldValue($object, $field);
                  case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Value':
                      return $field->getValue();
              }
          } catch (\Exception $e) {
              throw new \Exception(sprintf(
                  'Error encountered when trying to determine value from object "%s"',
                  get_class($object)
              ), null, $e);
          }
  
          throw new \RuntimeException(sprintf(
              'Unknown field type "%s" when trying to convert "%s" into a search document',
              get_class($field),
              get_class($object)
          ));
      }
code_tokens: public function getValue ( $ object , FieldInterface $ field ) { try { switch ( get_class ( $ field ) ) { case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Property' : return $ this -> getPropertyValue ( $ object , $ field ) ; case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Expression' : return $ this -> getExpressionValue ( $ object , $ field ) ; case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Field' : return $ this -> getFieldValue ( $ object , $ field ) ; case 'Massive\Bundle\SearchBundle\Search\Metadata\Field\Value' : return $ field -> getValue ( ) ; } } catch ( \ Exception $ e ) { throw new \ Exception ( sprintf ( 'Error encountered when trying to determine value from object "%s"' , get_class ( $ object ) ) , null , $ e ) ; } throw new \ RuntimeException ( sprintf ( 'Unknown field type "%s" when trying to convert "%s" into a search document' , get_class ( $ field ) , get_class ( $ object ) ) ) ; }
docstring: Evaluate the value from the given object and field.
  
  @param mixed $object
  @param FieldInterface $field
docstring_tokens: Evaluate the value from the given object and field .