本文整理汇总了PHP中Idno\Common\Entity::getPermalinkRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP Entity::getPermalinkRoute方法的具体用法?PHP Entity::getPermalinkRoute怎么用?PHP Entity::getPermalinkRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Idno\Common\Entity
的用法示例。
在下文中一共展示了Entity::getPermalinkRoute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerPages
/**
* Registers some core page URLs
*/
function registerPages()
{
$permalink_route = \Idno\Common\Entity::getPermalinkRoute();
/** Homepage */
$this->addPageHandler('/?', '\\Idno\\Pages\\Homepage');
$this->addPageHandler('/feed\\.xml', '\\Idno\\Pages\\Feed');
$this->addPageHandler('/feed/?', '\\Idno\\Pages\\Feed');
$this->addPageHandler('/rss\\.xml', '\\Idno\\Pages\\Feed');
$this->addPageHandler('/content/([A-Za-z\\-\\/]+)+', '\\Idno\\Pages\\Homepage');
/** Individual entities / posting / deletion */
$this->addPageHandler('/view/([\\%A-Za-z0-9]+)/?', '\\Idno\\Pages\\Entity\\View');
$this->addPageHandler('/s/([\\%A-Za-z0-9]+)/?', '\\Idno\\Pages\\Entity\\Shortlink');
$this->addPageHandler($permalink_route . '/?', '\\Idno\\Pages\\Entity\\View');
$this->addPageHandler('/edit/([A-Za-z0-9]+)/?', '\\Idno\\Pages\\Entity\\Edit');
$this->addPageHandler('/delete/([A-Za-z0-9]+)/?', '\\Idno\\Pages\\Entity\\Delete');
$this->addPageHandler('/withdraw/([A-Za-z0-9]+)/?', '\\Idno\\Pages\\Entity\\Withdraw');
/** Annotations */
$this->addPageHandler('/view/([A-Za-z0-9]+)/annotations/([A-Za-z0-9]+)?', '\\Idno\\Pages\\Annotation\\View');
$this->addPageHandler($permalink_route . '/annotations/([A-Za-z0-9]+)?', '\\Idno\\Pages\\Annotation\\View');
$this->addPageHandler($permalink_route . '/annotations/([A-Za-z0-9]+)/delete/?', '\\Idno\\Pages\\Annotation\\Delete');
// Delete annotation
$this->addPageHandler('/annotation/post/?', '\\Idno\\Pages\\Annotation\\Post');
/** Bookmarklets and sharing */
$this->addPageHandler('/share/?', '\\Idno\\Pages\\Entity\\Share');
$this->addPageHandler('/bookmarklet\\.js', '\\Idno\\Pages\\Entity\\Bookmarklet', true);
/** Mobile integrations */
$this->addPageHandler('/chrome/manifest\\.json', '\\Idno\\Pages\\Chrome\\Manifest', true);
/** Files */
$this->addPageHandler('/file/upload/?', '\\Idno\\Pages\\File\\Upload', true);
$this->addPageHandler('/file/picker/?', '\\Idno\\Pages\\File\\Picker', true);
$this->addPageHandler('/filepicker/?', '\\Idno\\Pages\\File\\Picker', true);
$this->addPageHandler('/file/([A-Za-z0-9]+)(/.*)?', '\\Idno\\Pages\\File\\View', true);
/** Users */
$this->addPageHandler('/profile/([^\\/]+)/?', '\\Idno\\Pages\\User\\View');
$this->addPageHandler('/profile/([^\\/]+)/edit/?', '\\Idno\\Pages\\User\\Edit');
/** Search */
$this->addPageHandler('/search/?', '\\Idno\\Pages\\Search\\Forward');
$this->addPageHandler('/search/mentions\\.json', '\\Idno\\Pages\\Search\\Mentions');
$this->addPageHandler('/tag/([^\\s]+)\\/?', '\\Idno\\Pages\\Search\\Tags');
/** robots.txt */
$this->addPageHandler('/robots\\.txt', '\\Idno\\Pages\\Txt\\Robots');
/** Autosave / preview */
$this->addPageHandler('/autosave/?', '\\Idno\\Pages\\Entity\\Autosave');
/** Installation / first use */
$this->addPageHandler('/begin/?', '\\Idno\\Pages\\Onboarding\\Begin', true);
$this->addPageHandler('/begin/register/?', '\\Idno\\Pages\\Onboarding\\Register', true);
$this->addPageHandler('/begin/profile/?', '\\Idno\\Pages\\Onboarding\\Profile');
$this->addPageHandler('/begin/connect/?', '\\Idno\\Pages\\Onboarding\\Connect');
$this->addPageHandler('/begin/connect\\-forwarder/?', '\\Idno\\Pages\\Onboarding\\ConnectForwarder');
$this->addPageHandler('/begin/publish/?', '\\Idno\\Pages\\Onboarding\\Publish');
/** Add some services */
$this->addPageHandler('/service/db/optimise/?', '\\Idno\\Pages\\Service\\Db\\Optimise');
$this->addPageHandler('/service/vendor/messages/?', '\\Idno\\Pages\\Service\\Vendor\\Messages');
// These must be loaded last
$this->plugins = new Plugins();
$this->themes = new Themes();
}