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


PHP Component::getId方法代码示例

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


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

示例1: addComponent

 protected final function addComponent(Component &$component)
 {
     if ($this->childExists($component->getId())) {
         throw new \RuntimeException(sprintf("Component %s already has a child with id %s", $this->getId(), $component->getId()));
     }
     if ($component->added) {
         throw new \RuntimeException(sprintf("Component %s has already been added to another", $component->getId()));
     }
     if ($component == $this) {
         throw new \RuntimeException(sprintf("Component %s cannot be added to itself.", $component->getId()));
     }
     $this->children[$component->getId()] = $component;
     $this->onComponentAdded($component);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:14,代码来源:MarkupContainer.php

示例2: onInherit

 public function onInherit(Component &$component)
 {
     if (!PropertyResolver::hasProperty($this->getModelObject(), $component->getId())) {
         return null;
     }
     return new WrappedCompoundModel($this);
 }
开发者ID:picon,项目名称:picon-framework,代码行数:7,代码来源:CompoundPropertyModel.php

示例3: getExistsCourse

 /**
  * Returns whether the component is installed for the given course
  *
  * Called when this component receives an HTTP GET request to
  * /link/exists/course/$courseid(/).
  *
  * @param int $courseid A course id.
  */
 public function getExistsCourse($courseid)
 {
     $result = Request::routeRequest('GET', '/process/course/' . $courseid . '/component/' . $this->_conf->getId(), $this->app->request->headers->all(), '', $this->_getProcess, 'process');
     if (isset($result['status']) && $result['status'] >= 200 && $result['status'] <= 299 && isset($result['content']) && $this->_conf !== null && $this->_conf->getId() !== null) {
         $this->app->response->setStatus(200);
         $this->app->stop();
     }
     $this->app->response->setStatus(409);
 }
开发者ID:sawh,项目名称:ostepu-system,代码行数:17,代码来源:LFormProcessor.php

示例4: renderHead

 public function renderHead(Component $component, HeaderContainer $headerContainer, HeaderResponse $headerResponse)
 {
     $markup = $component->loadAssociatedMarkup();
     $heads = $this->findHead(array($markup));
     foreach ($heads as $index => $head) {
         $id = $component->getId() . '_head_' . $index;
         $headerPart = new HeaderPartContainer($id, $head);
         $headerPart->render();
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:10,代码来源:AbstractAssociatedMarkupSource.php

示例5: getMarkup

 public function getMarkup(MarkupContainer $container, Component $child)
 {
     $markup = $container->getMarkup();
     if ($markup == null) {
         throw new \MarkupNotFoundException(sprintf("Markup for %s could not be found.", $child->getId()));
     }
     if ($child == null) {
         return $markup;
     }
     $m = MarkupUtils::findComponentTag($markup, $child->getId(), $container);
     if ($m == null) {
         foreach ($container->getChildren() as $ch) {
             if ($ch != $child && $ch instanceof MarkupContainer && $ch instanceof ComponentResolver) {
                 $m = $ch->getMarkupForChild($child);
                 if ($m != null) {
                     return $m;
                 }
             }
         }
     }
     return $m;
 }
开发者ID:picon,项目名称:picon-framework,代码行数:22,代码来源:DefaultMarkupSource.php

示例6: handle

 /**
  * @param \PowerEcommerce\Framework\Routing\Component $target
  *
  * @return \PowerEcommerce\System\Object
  */
 public function handle(Component $target)
 {
     /** @type \PowerEcommerce\Framework\Routing\Target $target */
     !$target instanceof \PowerEcommerce\Framework\Routing\Target && $this->invalid();
     /** @type \PowerEcommerce\Framework\Routing\Component $route */
     foreach ($this->getComponents() as $route) {
         $pattern = '/' . addcslashes($route->getId(), '/') . '/' . $route->getModifiers();
         if (preg_match($pattern, $target->getId()) || $route instanceof \PowerEcommerce\Framework\Routing\Router) {
             $route->handle($target);
         }
     }
     return $this;
 }
开发者ID:powerecommerce,项目名称:powerecommerce,代码行数:18,代码来源:Router.php

示例7: getExistsCourse

 /**
  * Returns whether the component is installed for the given course
  *
  * Called when this component receives an HTTP GET request to
  * /link/exists/course/$courseid(/).
  *
  * @param int $courseid A course id.
  */
 public function getExistsCourse($courseid)
 {
     // hier soll geprüft werden, ob ein entsprechender Eintrag für diese Komponente in der referenzierten Prozesstabelle besteht,
     // ob sie also als Verarbeitung registriert ist (dazu wird die ID dieser Komponente verwendet ($this->_conf->getId()))
     $result = Request::routeRequest('GET', '/process/course/' . $courseid . '/component/' . $this->_conf->getId(), array(), '', $this->_getProcess, 'process');
     // wenn etwas für die ID dieser Komponente von der DB geantwortet wird, ist die Installation korrekt bzw. vorhanden.
     if (isset($result['status']) && $result['status'] >= 200 && $result['status'] <= 299 && isset($result['content']) && $this->_conf !== null && $this->_conf->getId() !== null) {
         $this->app->response->setStatus(200);
         $this->app->stop();
     }
     // die Datenbank hat keinen Eintrag für diese Komponente geliefert oder ein sonstiger Fehler ist aufgetreten, daher
     // gilt die Installation als nicht vorhanden/korrekt
     $this->app->response->setStatus(409);
 }
开发者ID:sawh,项目名称:ostepu-system,代码行数:22,代码来源:LOOP.php

示例8: internalFindComponentTag

 private static function internalFindComponentTag(XmlElement $markup, $componentTagId, Component $component)
 {
     if ($markup instanceof ComponentTag && $markup->getComponentTagId() == $componentTagId) {
         return $markup;
     } else {
         if ($markup instanceof MarkupElement && $markup->hasChildren() && (!$markup instanceof ComponentTag || $component->getId() == $markup->getComponentTagId())) {
             $componentTag = null;
             foreach ($markup->getChildren() as $element) {
                 if ($element instanceof MarkupElement) {
                     $componentTag = self::internalFindComponentTag($element, $componentTagId, $component);
                     if ($componentTag != null) {
                         return $componentTag;
                     }
                 }
             }
         }
         return null;
     }
 }
开发者ID:picon,项目名称:picon-framework,代码行数:19,代码来源:MarkupUtils.php

示例9: detach

 /**
  * @param \PowerEcommerce\Framework\Security\Component $component
  *
  * @return $this
  */
 public function detach(Component $component)
 {
     !$component instanceof \PowerEcommerce\Framework\Security\Privilege && $this->invalid();
     return $this->del($component->getId());
 }
开发者ID:powerecommerce,项目名称:powerecommerce,代码行数:10,代码来源:Role.php

示例10: invalidate

 /**
  * Add the component for invalidation
  *
  * @param Component $c
  *
  * @return void
  */
 public function invalidate(Component $c)
 {
     $this->components[$c->getId()] = $c;
 }
开发者ID:stevencoulter,项目名称:cricket,代码行数:11,代码来源:AjaxResponseManager.php

示例11: flush

 /**
  * 
  * @param Component $component
  * @return int id of the Component inserted in base. False if it didn't work.
  */
 public static function flush($component)
 {
     $componentId = $component->getId();
     $mark = $component->getMark();
     $date = $component->getDate();
     $isResit = $component->getIsResit();
     $user = $component->getUser()->getId();
     $componentLinked = $component->getComponent()->getId();
     $module = $component->getModule()->getId();
     $type = $component->getType()->getId();
     if ($componentId > 0) {
         $sql = 'UPDATE component c SET ' . 'c.mark = ?, ' . 'c.date = ?, ' . 'c.is_resit = ?, ' . 'c.USER_id_user = ?, ' . 'c.COMPONENT_id_component = ?, ' . 'c.MODULE_id_module = ?, ' . 'c.TYPE_id_type= ? ' . 'WHERE c.id_component = ?';
         $params = array('dsiiiiii', &$mark, &$date, &$isResit, &$user, &$componentLinked, &$module, &$type, &$componentId);
     } else {
         $sql = 'INSERT INTO component ' . '(mark, date, is_resit, ' . 'USER_id_user, COMPONENT_id_component, MODULE_id_module, TYPE_id_type ) ' . 'VALUES(?, ?, ?, ?, ?, ?, ?) ';
         $params = array('dsiiiii', &$mark, &$date, &$isResit, &$user, &$componentLinked, &$module, &$type);
     }
     $idInsert = BaseSingleton::insertOrEdit($sql, $params);
     if ($idInsert !== false && $componentId > 0) {
         $idInsert = $componentId;
     }
     return $idInsert;
 }
开发者ID:Eurymone,项目名称:Student-Exam-Report-System,代码行数:28,代码来源:ComponentDAL.php

示例12: onNotAuthorised

 public function onNotAuthorised(Component $component)
 {
     throw new UnAuthorisdeException(sprintf('Not authorised for component %s', $component->getId()));
 }
开发者ID:picon,项目名称:picon-framework,代码行数:4,代码来源:DefaultNotAuthorisedListener.php


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