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


PHP AbstractPluginManager::has方法代码示例

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


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

示例1: hydrate

 /**
  * Converts the given value so that it can be hydrated by the hydrator.
  *
  * @param mixed $value The original value.
  * @param array $data (optional) The original data for context.
  * @return mixed Returns the value that should be hydrated.
  */
 public function hydrate($value)
 {
     if ($value instanceof StateInterface) {
         return $value;
     }
     if (is_string($value)) {
         if ($this->checkPlugin() && $this->plugins->has($value)) {
             return $this->plugins->get($value);
         }
         throw new \RuntimeException(sprintf('No service registered in %s with name %s', is_object($this->plugins) ? get_class($this->plugins) : gettype($this->plugins), $value));
     }
     if (empty($value) && $this->checkPlugin() && $this->plugins->has($this->firstStateName)) {
         return $this->plugins->has($this->firstStateName);
     }
     // FIXME is correct? or exception
     return $value;
 }
开发者ID:strapieno,项目名称:str-utils,代码行数:24,代码来源:StateStrategy.php

示例2: has

 public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = true)
 {
     if (is_string($name)) {
         // internally called with an array [normalizedName, requestedName].
         $this->incrementCallCount('has', $name);
     }
     return parent::has($name, $checkAbstractFactories, $usePeeringServiceManagers);
 }
开发者ID:cross-solution,项目名称:yawik,代码行数:8,代码来源:PluginManagerMock.php

示例3: has

 /**
  * {@inheritDoc}
  */
 public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = true)
 {
     return parent::has($name, $checkAbstractFactories, false);
     // Don't look in peering service managers
 }
开发者ID:detailnet,项目名称:dfw-fileconversion-module,代码行数:8,代码来源:AdapterManager.php

示例4: has

 /**
  * Override: do not use peering service managers
  *
  * @param  string|array $name
  * @param  bool         $checkAbstractFactories
  * @param  bool         $usePeeringServiceManagers
  * @return bool
  */
 public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = false)
 {
     return parent::has($name, $checkAbstractFactories, $usePeeringServiceManagers);
 }
开发者ID:CHRISTOPHERVANDOMME,项目名称:zf2complet,代码行数:12,代码来源:ControllerManager.php


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