X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdoctrine%2Fcollections%2Flib%2FDoctrine%2FCommon%2FCollections%2FExpressionBuilder.php;h=1a44a7ba844284f6c6fb2560c24970c6f8d47d83;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hp=6539e3c75fd44f27b38e81e6bec5f5f7a76e92ab;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php index 6539e3c75..1a44a7ba8 100644 --- a/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php +++ b/vendor/doctrine/collections/lib/Doctrine/Common/Collections/ExpressionBuilder.php @@ -27,7 +27,7 @@ use Doctrine\Common\Collections\Expr\Value; * Builder for Expressions in the {@link Selectable} interface. * * Important Notice for interoperable code: You have to use scalar - * values only for comparisons, otherwise the behavior of the comparision + * values only for comparisons, otherwise the behavior of the comparison * may be different between implementations (Array vs ORM vs ODM). * * @author Benjamin Eberlei @@ -163,4 +163,38 @@ class ExpressionBuilder { return new Comparison($field, Comparison::CONTAINS, new Value($value)); } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function memberOf ($field, $value) + { + return new Comparison($field, Comparison::MEMBER_OF, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function startsWith($field, $value) + { + return new Comparison($field, Comparison::STARTS_WITH, new Value($value)); + } + + /** + * @param string $field + * @param mixed $value + * + * @return Comparison + */ + public function endsWith($field, $value) + { + return new Comparison($field, Comparison::ENDS_WITH, new Value($value)); + } + }