You are here

public function Entry::createSource in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::createSource()

Creates a new Zend\Feed\Writer\Source data container for use. This is NOT added to the current feed automatically, but is necessary to create a container with some initial values preset based on the current feed data.

Return value

Source

File

vendor/zendframework/zend-feed/src/Writer/Entry.php, line 716

Class

Entry

Namespace

Zend\Feed\Writer

Code

public function createSource() {
  $source = new Source();
  if ($this
    ->getEncoding()) {
    $source
      ->setEncoding($this
      ->getEncoding());
  }
  $source
    ->setType($this
    ->getType());
  return $source;
}