You are here

public function FeedsElement::__toString in Feeds 7

Same name and namespace in other branches
  1. 6 plugins/FeedsParser.inc \FeedsElement::__toString()
  2. 7.2 plugins/FeedsParser.inc \FeedsElement::__toString()

Return value

A string representation of this element.

1 method overrides FeedsElement::__toString()
FeedsDateTimeElement::__toString in plugins/FeedsParser.inc
Implements toString magic php method.

File

plugins/FeedsParser.inc, line 124

Class

FeedsElement
Defines an element of a parsed result. Such an element can be a simple type, a complex type (derived from FeedsElement) or an array of either.

Code

public function __toString() {
  if (is_array($this->value)) {
    return 'Array';
  }
  if (is_object($this->value)) {
    return 'Object';
  }
  return (string) $this
    ->getValue();
}