Example #1
0
 /**
  * Creates a new query with an initial condition.
  * 
  * @param string $name   The name of the property to test.
  * @param string $value  The value to test against. Not required for
  *     existence tests.
  * @param string $action One of the ACTION_* constants. Describes the
  *     operation to perform.
  * 
  * @return self|Query The query object.
  */
 public static function where($name, $value = null, $action = self::ACTION_EXIST)
 {
     $query = new static();
     return $query->addWhere($name, $value, $action);
 }
Example #2
0
 /**
  * Creates a new query with an initial condition.
  * 
  * @param string               $name     The name of the property to test.
  * @param string|resource|null $value    Value of the property as a string
  *     or seekable stream. Not required for existence tests.
  *     If a seekable stream is provided, it is sent from its current
  *     posistion to its end, and the pointer is seeked back to its current
  *     position after sending.
  *     Non seekable streams, as well as all other types, are casted to a
  *     string.
  * @param string               $operator One of the OP_* constants.
  *     Describes the operation to perform.
  * 
  * @return static A new query object.
  */
 public static function where($name, $value = null, $operator = self::OP_EX)
 {
     $query = new static();
     return $query->addWhere($name, $value, $operator);
 }