/* @var $tournament Match */ $description = PlayerType::Text($tournament->GetPlayerType()) . " tournament"; if ($tournament->GetQualificationType() === MatchQualification::OPEN_TOURNAMENT) { $description = Html::Encode("Any team may enter this " . strtolower($description)); } else { if ($tournament->GetQualificationType() === MatchQualification::CLOSED_TOURNAMENT) { $description .= " for invited or qualifying teams only"; } } $description .= ". "; if ($tournament->GetIsMaximumPlayersPerTeamKnown()) { $description .= Html::Encode($tournament->GetMaximumPlayersPerTeam() . " players per team. "); } if ($tournament->GetIsOversKnown()) { $description .= Html::Encode("Matches are " . $tournament->GetOvers() . " overs. "); } if ($tournament->GetGround()) { $description .= "<br /><br />This tournament will take place at " . Html::Encode($tournament->GetGround()->GetNameAndTown()) . ". "; } if ($tournament->GetNotes()) { $description .= "<br /><br />" . Html::Encode($tournament->GetNotes()); } $medium = $tweet ? "twitter" : "rss"; $feedData["entries"][] = array('title' => $item_title, 'description' => $description, 'link' => "http://" . $settings->GetDomain() . $tournament->GetNavigateUrl() . "?utm_source=stoolballengland&utm_medium=" . $medium . "&utm_campaign=tournaments", 'guid' => $tournament->GetLinkedDataUri(), "lastUpdate" => $tournament->GetLastAudit()->GetTime(), "category" => array(array("term" => strtolower(PlayerType::Text($tournament->GetPlayerType()))))); } // create our feed object and import the data $feed = Zend_Feed::importArray($feedData, 'rss'); // set the Content Type of the document header('Content-type: text/xml'); // echo the contents of the RSS xml document echo $feed->send();