class FeedsTermElement

  1. cis7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement
  2. cle7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement
  3. elmsmedia7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement
  4. icor7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement
  5. meedjum_blog7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement
  6. mooc7 sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc FeedsTermElement

Encapsulates a taxonomy style term object.

Objects of this class can be turned into a taxonomy term style arrays by casting them.

  $term_object = new FeedsTermElement($term_array);
  $term_array = (array)$term_object;

Hierarchy

Expanded class hierarchy of FeedsTermElement

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
FeedsElement::$value protected property
FeedsElement::__toString public function Magic method __toString() for printing and string conversion of this object.
FeedsTermElement::$tid public property
FeedsTermElement::getValue public function Use $name as $value. Overrides FeedsElement::getValue
FeedsTermElement::__construct public function Overrides FeedsElement::__construct

File

sites/all/modules/ulmus/feeds/plugins/FeedsParser.inc, line 211
Contains FeedsParser and related classes.

View source
class FeedsTermElement extends FeedsElement {
  public $tid, $vid, $name;

  /**
   * @param $term
   *   An array or a stdClass object that is a Drupal taxonomy term.
   */
  public function __construct($term) {
    if (is_array($term)) {
      parent::__construct($term['name']);
      foreach ($this as $key => $value) {
        $this->$key = isset($term[$key]) ? $term[$key] : NULL;
      }
    }
    elseif (is_object($term)) {
      parent::__construct($term->name);
      foreach ($this as $key => $value) {
        $this->$key = isset($term->$key) ? $term->$key : NULL;
      }
    }
  }

  /**
   * Use $name as $value.
   */
  public function getValue() {
    return $this->name;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.