本文整理汇总了PHP中Webmozart\Expression\Expr::notEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP Expr::notEquals方法的具体用法?PHP Expr::notEquals怎么用?PHP Expr::notEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Webmozart\Expression\Expr
的用法示例。
在下文中一共展示了Expr::notEquals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: leaveExpression
/**
* {@inheritdoc}
*/
public function leaveExpression(Expression $expr)
{
if ($expr instanceof Method) {
switch ($expr->getMethodName()) {
case 'getUuid':
return Expr::method('getUuid', $expr->getExpression());
case 'getGlob':
$queryExpr = $expr->getExpression();
if ($queryExpr instanceof Same) {
$queryExpr = Expr::same($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof Equals) {
$queryExpr = Expr::equals($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof NotSame) {
$queryExpr = Expr::notSame($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof NotEquals) {
$queryExpr = Expr::notEquals($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof EndsWith) {
$queryExpr = Expr::endsWith($queryExpr->getAcceptedSuffix() . '{,/**/*}');
}
return Expr::method('getBinding', Expr::method('getQuery', $queryExpr));
case 'getServerName':
return Expr::method('getParameterValue', DiscoveryUrlGenerator::SERVER_PARAMETER, $expr->getExpression());
case 'getServerPath':
return Expr::method('getParameterValue', DiscoveryUrlGenerator::PATH_PARAMETER, $expr->getExpression());
}
}
return $expr;
}
示例2: orNotEquals
public function orNotEquals($value)
{
return $this->orX(Expr::notEquals($value));
}
示例3: leaveExpression
/**
* {@inheritdoc}
*/
public function leaveExpression(Expression $expr)
{
if ($expr instanceof Key) {
switch ($expr->getKey()) {
case AssetMapping::UUID:
return Expr::key(BindingDescriptor::UUID, $expr->getExpression());
case AssetMapping::GLOB:
$queryExpr = $expr->getExpression();
if ($queryExpr instanceof Same) {
$queryExpr = Expr::same($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof Equals) {
$queryExpr = Expr::equals($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof NotSame) {
$queryExpr = Expr::notSame($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof NotEquals) {
$queryExpr = Expr::notEquals($queryExpr->getComparedValue() . '{,/**/*}');
} elseif ($queryExpr instanceof EndsWith) {
$queryExpr = Expr::endsWith($queryExpr->getAcceptedSuffix() . '{,/**/*}');
}
return Expr::key(BindingDescriptor::QUERY, $queryExpr);
case AssetMapping::SERVER_NAME:
return Expr::key(BindingDescriptor::PARAMETER_VALUES, Expr::key(DiscoveryUrlGenerator::SERVER_PARAMETER, $expr->getExpression()));
case AssetMapping::SERVER_PATH:
return Expr::key(BindingDescriptor::PARAMETER_VALUES, Expr::key(DiscoveryUrlGenerator::PATH_PARAMETER, $expr->getExpression()));
}
}
return $expr;
}
示例4: testAppendDefaultQuerySuffixForNotEquals
public function testAppendDefaultQuerySuffixForNotEquals()
{
$expr1 = Expr::notEquals('/path', AssetMapping::GLOB);
$expr2 = Expr::same(BindingState::ENABLED, BindingDescriptor::STATE)->andSame(DiscoveryUrlGenerator::BINDING_TYPE, BindingDescriptor::TYPE_NAME)->andEndsWith('{,/**/*}', BindingDescriptor::QUERY)->andNotEquals('/path{,/**/*}', BindingDescriptor::QUERY);
$this->assertEquals($expr2, $this->builder->buildExpression($expr1));
}
示例5: andNotEquals
public function andNotEquals($value)
{
return $this->andX(Expr::notEquals($value));
}