本文整理汇总了PHP中Assert::isIndexExists方法的典型用法代码示例。如果您正苦于以下问题:PHP Assert::isIndexExists方法的具体用法?PHP Assert::isIndexExists怎么用?PHP Assert::isIndexExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assert
的用法示例。
在下文中一共展示了Assert::isIndexExists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: evaluate
public function evaluate($values)
{
if ($this->isBindable()) {
Assert::isPositiveInteger($this->getValue(), 'wrong substitution number: $' . $this->getValue());
Assert::isIndexExists($values, $this->getValue(), 'parameter $' . $this->getValue() . ' is not binded');
$value = $values[$this->getValue()];
} else {
$value = $this->getValue();
}
if ($value instanceof Query) {
return $value;
} elseif ($value instanceof Identifiable) {
return $value->getId();
} elseif (is_array($value)) {
$list = array();
foreach ($value as $key => $parameter) {
if ($parameter instanceof OqlQueryParameter) {
$list[$key] = $parameter->evaluate($values);
} else {
$list[$key] = $parameter;
}
}
return $list;
}
return $value;
}
示例2: disablePrefix
/**
* @return MultiPrefixPhpViewResolver
**/
public function disablePrefix($alias = null, $disabled = true)
{
if (!$alias) {
$alias = $this->lastAlias;
}
Assert::isNotNull($alias, 'nothing to disable');
Assert::isIndexExists($this->prefixes, $alias, 'no such alias: ' . $alias);
$this->disabled[$alias] = $disabled;
return $this;
}
示例3: cloneInnerBuilder
public function cloneInnerBuilder($property)
{
$mapping = $this->getFormMapping();
Assert::isIndexExists($mapping, $property);
$primitive = $mapping[$property];
Assert::isInstance($primitive, 'PrimitiveForm');
$result = new $this($primitive->getProto());
if (isset($this->limitedPropertiesList[$primitive->getName()])) {
$result->setLimitedPropertiesList($this->limitedPropertiesList[$primitive->getName()]);
}
return $result;
}
示例4: checkMandatory
protected function checkMandatory(array $assoc)
{
foreach (self::$mandatoryFields as $field) {
Assert::isIndexExists($assoc, $field, "Mandatory field '{$field}' not found");
}
return $this;
}
示例5: setCurrent
/**
* @param string $name
* @return AMQPSelective
*/
public function setCurrent($name)
{
Assert::isIndexExists($this->pool, $name);
$this->current = $name;
return $this;
}