Yaffs site version 1.1
[yaffs-website] / vendor / doctrine / collections / lib / Doctrine / Common / Collections / ExpressionBuilder.php
index 6539e3c75fd44f27b38e81e6bec5f5f7a76e92ab..1a44a7ba844284f6c6fb2560c24970c6f8d47d83 100644 (file)
@@ -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 <kontakt@beberlei.de>
@@ -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));
+    }    
+
 }