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


PHP WebPage::getIdentifier方法代码示例

本文整理汇总了PHP中WebPage::getIdentifier方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::getIdentifier方法的具体用法?PHP WebPage::getIdentifier怎么用?PHP WebPage::getIdentifier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebPage的用法示例。


在下文中一共展示了WebPage::getIdentifier方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(Identifier $page)
 {
     if (!$page->of(WebPage::getIdentifier())) {
         throw new \InvalidArgumentException(sprintf('RestartRequestOnPageException expects a web page identifier, %s given.', $page->getFullyQualifiedName()));
     }
     $this->page = $page;
     parent::__construct('RestartRequestOnPageException');
 }
开发者ID:picon,项目名称:picon-framework,代码行数:8,代码来源:RestartRequestOnPageException.php

示例2: __construct

 public function __construct(Identifier $pageIdentifier, Identifier $loginPage)
 {
     Args::identifierOf($pageIdentifier, WebPage::getIdentifier(), 'pageIdentifier');
     Args::identifierOf($loginPage, WebPage::getIdentifier(), 'loginPage');
     $this->pageAuthIdentifier = $pageIdentifier;
     $this->loginPageIdentifier = $loginPage;
     PiconApplication::get()->getSecuritySettings()->setComponentNotAuthorisedListener(new DirectToPageComponentNotAuthorisedListener($loginPage));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:8,代码来源:AbstractPageClassAuthorisationStrategy.php

示例3: mount

 public function mount($path, Identifier $page)
 {
     if (!$page->of(WebPage::getIdentifier())) {
         throw new \InvalidArgumentException('Expected an identifier of a web page');
     }
     if ($this->isMounted($path)) {
         throw new \InvalidArgumentException(sprintf('The path %s is already mounted', $path));
     }
     $this->addToPath($path, $page->getFullyQualifiedName());
     $this->mountedPages[] = $path;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:11,代码来源:PageMap.php

示例4: setPage

 /**
  * Set the current page
  * @param mixed $page An instance of web page or an Identifier for a web page
  * @todo add page params
  */
 public function setPage($page)
 {
     Args::notNull($page, 'page');
     if ($page instanceof Identifier) {
         if ($page->of(WebPage::getIdentifier())) {
             $target = new PageRequestTarget($page);
         } else {
             throw new \InvalidArgumentException("Expected identifier to be for a web page");
         }
     } else {
         if ($page instanceof WebPage) {
             PageMap::get()->addOrUpdate($page);
             $target = new PageInstanceRequestTarget($page);
         } else {
             throw new \InvalidArgumentException(sprintf("setPage expects an identifier for a web page or an instance of a web page and not a %s", get_class($page)));
         }
     }
     if ($this->getRequestCycle()->containsTarget(ListenerRequestTarget::getIdentifier())) {
         $url = $this->getRequestCycle()->generateUrl($target);
         $this->getRequestCycle()->addTarget(new RedirectRequestTarget($url));
     } else {
         $this->getRequestCycle()->addTarget($target);
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:29,代码来源:Component.php

示例5: __construct

 /**
  *
  * @param Identifier $targetPage The page to redirect to
  */
 public function __construct(Identifier $targetPage)
 {
     Args::identifierOf($targetPage, WebPage::getIdentifier(), 'targetPage');
     $this->targetPage = $targetPage;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:9,代码来源:DirectToPageComponentNotAuthorisedListener.php


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