本文整理匯總了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;
}