本文整理汇总了PHP中ProjectConfiguration::getApplicationAmazonCloudFrontUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectConfiguration::getApplicationAmazonCloudFrontUrl方法的具体用法?PHP ProjectConfiguration::getApplicationAmazonCloudFrontUrl怎么用?PHP ProjectConfiguration::getApplicationAmazonCloudFrontUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectConfiguration
的用法示例。
在下文中一共展示了ProjectConfiguration::getApplicationAmazonCloudFrontUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getGraphicUrl
public function getGraphicUrl()
{
if (!$this->getGraphicFile()) {
return null;
}
if (time() > strtotime($this->getReleaseDate())) {
return rtrim(ProjectConfiguration::getApplicationAmazonCloudFrontUrl(), '/') . '/upload/' . $this->getGraphicFile();
} else {
return rtrim(ProjectConfiguration::getApplicationAmazonBucketUrl(), '/') . '/upload/' . $this->getGraphicFile();
}
}
示例2: createFeedArray
protected function createFeedArray($episode_array, $title, $link, $atom_link, $description, $is_nsfw = false)
{
$feedArray = array('title' => ProjectConfiguration::getApplicationName() . ' - ' . $title, 'link' => $link, 'atom_link' => $atom_link, 'description' => $description, 'language' => 'en-us', 'charset' => sfConfig::get('sf_charset'), 'pubDate' => time(), 'is_nsfw' => $is_nsfw ? 'yes' : 'no', 'entries' => array());
/* get the data from the db or outher source */
foreach ($episode_array as $episode) {
/* @var $episode Episode */
$new_entry = array('title' => $episode->getTitle(), 'link' => $this->getController()->genUrl('@episode_show?id=' . $episode->getIncremented(), true), 'guid' => $episode->getIncremented(), 'description' => html_entity_decode($this->getUser()->formatMarkdown($episode->getDescription())), 'content' => html_entity_decode($this->getUser()->formatMarkdown($episode->getDescription())), 'lastUpdate' => strtotime($episode->getReleaseDate()), 'modified' => strtotime($episode->getUpdatedAt()), 'released' => strtotime($episode->getReleaseDate()), 'author' => array('name' => $this->_users[$this->_assignments[$episode->getEpisodeAssignmentId()]->getSfGuardUserId()]->getUsername(), 'email' => $this->_users[$this->_assignments[$episode->getEpisodeAssignmentId()]->getSfGuardUserId()]->getEmailAddress(), 'uri' => $this->getController()->genUrl('@homepage', true)), 'audio_location' => $episode->getFileIsRemote() ? $episode->getRemoteUrl() : $this->getController()->genUrl('@episode_audio?id=' . $episode->getId() . '&format=' . substr($episode->getAudioFile(), -3, 3), true), 'thumbnail' => '', 'reddit_post_url' => $episode->getRedditPostUrl() ? $episode->getRedditPostUrl() : '', 'is_nsfw' => $episode->getIsNsfw() ? 'yes' : 'no');
if ($episode->getGraphicFile()) {
$new_entry['thumbnail'] = rtrim(ProjectConfiguration::getApplicationAmazonCloudFrontUrl(), '/') . '/upload/' . $episode->getGraphicFile();
}
$feedArray['entries'][] = $new_entry;
}
return $feedArray;
}