Exemplo n.º 1
0
 /**
  * Set remote content
  *
  * @param SimpleXMLElement $xml
  * @return void
  */
 private function setRemoteContent(\SimpleXMLElement $xml)
 {
     $this->remoteContent = new \Doctrine\Common\Collections\ArrayCollection();
     foreach ($xml->children() as $remoteContentXml) {
         $this->remoteContent->add(RemoteContent::createFromXml($remoteContentXml));
     }
 }
Exemplo n.º 2
0
 /**
  * Get remote content src
  *
  * @param Newscoop\News\RemoteContent $remoteContent
  * @return string
  */
 public function getRemoteContentSrc(RemoteContent $remoteContent)
 {
     return sprintf('%s?token=%s', $remoteContent->getHref(), $this->getToken());
 }