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


PHP Component::getIdentifier方法代码示例

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


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

示例1: isComponentInstantiationAuthorised

 public function isComponentInstantiationAuthorised(Component $component)
 {
     if ($component instanceof WebPage && $component->getIdentifier()->of($this->pageAuthIdentifier)) {
         return $this->isAuthorised();
     }
     return true;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:7,代码来源:AbstractPageClassAuthorisationStrategy.php

示例2: internalInitialize

 public function internalInitialize()
 {
     parent::internalInitialize();
     $callback = function (&$component) {
         $component->internalInitialize();
         return Component::VISITOR_CONTINUE_TRAVERSAL;
     };
     $this->visitChildren(Component::getIdentifier(), $callback);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:9,代码来源:MarkupContainer.php

示例3: onComponentTagBody

 protected function onComponentTagBody(ComponentTag $tag)
 {
     $this->getResponse()->write('<head>');
     parent::onComponentTagBody($tag);
     $page = $this->getPage();
     $headerResponse = new HeaderResponse($this->getResponse());
     PiconApplication::get()->getComponentRenderHeadListener()->onHeadRendering($this, $headerResponse);
     $page->renderHead($headerResponse);
     $self = $this;
     $callback = function (Component &$component) use($headerResponse, $self) {
         $component->renderHeadContainer($self, $headerResponse);
         return Component::VISITOR_CONTINUE_TRAVERSAL;
     };
     $page->visitChildren(Component::getIdentifier(), $callback);
     $this->getResponse()->write('</head>');
 }
开发者ID:picon,项目名称:picon-framework,代码行数:16,代码来源:HeaderContainer.php

示例4: getSubmitForm

 private function getSubmitForm()
 {
     $usingComponent = $this->form;
     $form = $this->form;
     if ($usingComponent == null) {
         $usingComponent = $this->getComponent();
     }
     $callback = function (&$component) use(&$form) {
         if ($component instanceof Form) {
             $form = $component;
         }
         if ($component instanceof ModalWindow) {
             return Component::VISITOR_STOP_TRAVERSAL;
         }
         return Component::VISITOR_CONTINUE_TRAVERSAL;
     };
     $usingComponent->visitParents(Component::getIdentifier(), $callback);
     return $form;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:19,代码来源:AjaxFormComponentUpdateBehavior.php

示例5: isPageStateless

 public function isPageStateless()
 {
     $stateless = $this->isStateless();
     if (!$stateless) {
         return $stateless;
     }
     $reflection = new \ReflectionClass(get_called_class());
     $constructor = $reflection->getConstructor();
     $params = $constructor->getParameters();
     //@todo also add page params to this when in place
     $stateless = count($params) == 0;
     if (!$stateless) {
         return $stateless;
     }
     $callback = function ($component) use(&$stateless) {
         if (!$component->isStateless()) {
             $stateless = false;
             return Component::VISITOR_STOP_TRAVERSAL;
         }
         return Component::VISITOR_CONTINUE_TRAVERSAL;
     };
     $this->visitChildren(Component::getIdentifier(), $callback);
     return $stateless;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:24,代码来源:WebPage.php

示例6: renderComponentHeader

 private function renderComponentHeader(Component $component, Response $response, $headerResponse)
 {
     $header = new HeaderContainer(HeaderResolver::HEADER_ID);
     $page = $component->getPage();
     $page->addOrReplace($header);
     PiconApplication::get()->getComponentRenderHeadListener()->onHeadRendering($component, $headerResponse);
     $page->renderHead($headerResponse);
     $component->renderHeadContainer($header, $headerResponse);
     $callback = function (Component &$component) use($headerResponse, $header) {
         $component->renderHeadContainer($header, $headerResponse);
         return Component::VISITOR_CONTINUE_TRAVERSAL;
     };
     if ($component instanceof MarkupContainer) {
         $component->visitChildren(Component::getIdentifier(), $callback);
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:16,代码来源:AjaxRequestTarget.php

示例7: getComponentPath

 public function getComponentPath()
 {
     $page = $this->getPage();
     if ($page == null) {
         throw new \IllegalStateException(sprintf("Unable to generate a path for component %s as it has an incomplete hierarchy.", $this->id));
     }
     $path = $this->getId();
     $callback = function ($component) use(&$path) {
         if (!$component instanceof WebPage) {
             $path = $component->getId() . Component::PATH_SEPERATOR . $path;
             return Component::VISITOR_CONTINUE_TRAVERSAL;
         }
         return Component::VISITOR_STOP_TRAVERSAL;
     };
     $this->visitParents(Component::getIdentifier(), $callback);
     return str_replace(self::PATH_SEPERATOR . self::PATH_SEPERATOR, '', $path . self::PATH_SEPERATOR);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:17,代码来源:Component.php


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