當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。