本文整理匯總了PHP中Illuminate\Support\Str::canonicalize方法的典型用法代碼示例。如果您正苦於以下問題:PHP Str::canonicalize方法的具體用法?PHP Str::canonicalize怎麽用?PHP Str::canonicalize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Support\Str
的用法示例。
在下文中一共展示了Str::canonicalize方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: feedAddItem
/**
* Adds an item to the feed.
*
* @param \Roumen\Feed\Facades\Feed $feed
* @param \CachetHQ\Cachet\Models\Incident $incident
*/
private function feedAddItem(&$feed, $incident)
{
$feed->add($incident->name, Setting::get('app_name'), Str::canonicalize(Setting::get('app_domain')) . '#' . $incident->id, $incident->created_at->toRssString(), $incident->message);
}
示例2: feedAddItem
/**
* Adds an item to the feed.
*
* @param \Roumen\Feed\Facades\Feed $feed
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
private function feedAddItem(&$feed, $incident)
{
$feed->add($incident->name, Setting::get('app_name'), Str::canonicalize(Setting::get('app_domain')) . '#' . $incident->id, $incident->created_at->toAtomString(), Markdown::convertToHtml($incident->message));
}
示例3: feedAddItem
/**
* Adds an item to the feed.
*
* @param \Roumen\Feed\Facades\Feed $feed
* @param \CachetHQ\Cachet\Models\Incident $incident
*/
private function feedAddItem(&$feed, $incident)
{
$feed->add($incident->name, Setting::get('app_name'), Str::canonicalize(route('incident', ['id' => $incident->id])), $incident->created_at->toRssString(), $incident->message);
}
示例4: feedAddItem
/**
* Adds an item to the feed.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
* @param bool $isRss
*/
private function feedAddItem(Incident $incident, $isRss)
{
$this->feed->add($incident->name, Setting::get('app_name'), Str::canonicalize(route('incident', ['id' => $incident->id])), $isRss ? $incident->created_at->toRssString() : $incident->created_at->toAtomString(), $isRss ? $incident->message : Markdown::convertToHtml($incident->message));
}
示例5: feedAddItem
/**
* Adds an item to the feed.
*
* @param \Gitamin\Models\Issue $issue
* @param bool $isRss
*/
private function feedAddItem($issue, $isRss)
{
$this->feed->add($issue->name, Setting::get('app_name'), Str::canonicalize($issue->url), $isRss ? $issue->created_at->toRssString() : $issue->created_at->toAtomString(), $isRss ? $issue->message : Markdown::convertToHtml($issue->message));
}