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


PHP Assertion::keyIsset方法代码示例

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


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

示例1: fromString

 /**
  * @param string $location
  *
  * @return static
  */
 public static function fromString($location)
 {
     Assertion::string($location);
     $result = explode('.', $location);
     Assertion::keyIsset($result, 0);
     Assertion::keyIsset($result, 1);
     return new static((int) $result[0], (int) $result[1]);
 }
开发者ID:WeCamp,项目名称:flyingliquourice,代码行数:13,代码来源:Coords.php

示例2: getDataMapperForEntity

 /**
  * @param string $entityClass
  *
  * @return DataMapperInterface
  */
 public function getDataMapperForEntity($entityClass)
 {
     Assertion::keyIsset($this->entityDataMapperMap, $entityClass, sprintf("Could not find data mapper service name for entity class '%s'", $entityClass));
     $entityDMServiceName = $this->entityDataMapperMap[$entityClass];
     $dataMapper = $this->get($entityDMServiceName);
     if (!is_a($dataMapper->getEntityClass(), $entityClass, true)) {
         throw new Exception\RuntimeException(sprintf('"%s" entity class mismatch: expected "%s", got "%s"', $entityDMServiceName, $entityClass, $dataMapper->getEntityClass()));
     }
     return $dataMapper;
 }
开发者ID:stefanotorresi,项目名称:thorr-persistence,代码行数:15,代码来源:DataMapperManager.php

示例3: getTemplateService

 public function getTemplateService($eng = "")
 {
     $ret = null;
     // spécify engine or use default
     $engine = $eng == "" ? TEMPLATE_ENGINE : $eng;
     try {
         Assertion::keyIsset($this->arr, $engine, "Template engine {$engine}  is not defined");
         $class = $this->arr[$engine];
         Assertion::ClassExists($class);
         $ret = new $class();
     } catch (Exception $e) {
     }
     return $ret;
 }
开发者ID:kletellier,项目名称:mvc,代码行数:14,代码来源:TemplateProvider.php

示例4: __construct

 public function __construct(CommitteeId $id, string $name, string $summary, Email $email = null, string $markDown = '', string $html = '', array $members = [])
 {
     $this->id = (string) $id;
     $this->name = $name;
     $this->summary = $summary;
     $this->email = (string) $email;
     $this->markDown = $markDown;
     $this->html = $html;
     foreach ($members as $member) {
         Assertion::keyIsset($member, 'id');
         Assertion::keyIsset($member, 'first_name');
         Assertion::keyIsset($member, 'last_name');
     }
     $this->members = $members;
 }
开发者ID:ProfessorFrancken,项目名称:ProfessorFrancken,代码行数:15,代码来源:CommitteesList.php

示例5: iShouldSee

 /**
  * @Then I should see :arg1 for property :arg2
  */
 public function iShouldSee($arg1, $arg2)
 {
     Assertion::keyIsset($this->response['errors'], $arg2);
     Assertion::inArray($arg1, $this->response['errors'][$arg2]);
 }
开发者ID:thomasmodeneis,项目名称:Sententiaregum,代码行数:8,代码来源:RegistrationContext.php

示例6: checkNameSuggestions

 /**
  * @Then /^I should see suggestions for my username$/
  */
 public function checkNameSuggestions()
 {
     Assertion::keyIsset($this->apiContext->getResponse(), 'name_suggestions');
 }
开发者ID:sententiaregum,项目名称:sententiaregum,代码行数:7,代码来源:CreateAccountContext.php


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