class TestParser

Defines a Test parser implementation.

Parses RSS, Atom and RDF feeds.

Plugin annotation


@AggregatorParser(
  id = "aggregator_test_parser",
  title = @Translation("Test parser"),
  description = @Translation("Dummy parser for testing purposes.")
)

Hierarchy

Expanded class hierarchy of TestParser

File

drupal/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/parser/TestParser.php, line 27
Contains \Drupal\aggregator_test\Plugin\aggregator\parser\TestParser.

Namespace

Drupal\aggregator_test\Plugin\aggregator\parser
View source
class TestParser extends DefaultParser implements ParserInterface {

  /**
   * Implements \Drupal\aggregator\Plugin\ParserInterface::parse().
   *
   * @todo Actually test this.
   */
  public function parse(Feed $feed) {
    return parent::parse($feed);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DefaultParser::$channel protected property The extracted channel info.
DefaultParser::$element protected property The element that is being processed.
DefaultParser::$image protected property The extracted image info.
DefaultParser::$item protected property Key that holds the number of processed "entry" and "item" tags.
DefaultParser::$items protected property The extracted items.
DefaultParser::$tag protected property The tag that is being processed.
DefaultParser::elementData function XML parser callback: Perform an action when data is encountered.
DefaultParser::elementEnd protected function XML parser callback: Perform an action when a closing tag is encountered.
DefaultParser::elementStart protected function XML parser callback: Perform an action when an opening tag is encountered.
DefaultParser::parseFeed protected function Parses a feed and stores its items.
DefaultParser::parseW3cdtf function Parses the W3C date/time format, a subset of ISO 8601.
TestParser::parse public function Implements \Drupal\aggregator\Plugin\ParserInterface::parse(). Overrides DefaultParser::parse