当前位置: 首页>>代码示例>>PHP>>正文


PHP Entity::getPermalinkRoute方法代码示例

本文整理汇总了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();
 }
开发者ID:kylewm,项目名称:Known,代码行数:60,代码来源:Idno.php


注:本文中的Idno\Common\Entity::getPermalinkRoute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。