Skip to content

Commit

Permalink
Improving docs for the TupleComparison expression class
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 12, 2014
1 parent c2ddf76 commit e109c7c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Cake/Database/Expression/TupleComparison.php
Expand Up @@ -19,21 +19,23 @@
use Cake\Database\ValueBinder;

/**
*
* This expression represents SQL fragments that are use for comparing one tuple
* to another, one tuple to a set of other tuples or one tuple to an expression
*/
class TupleComparison extends Comparison {

/**
* Constructor
*
* @param string $field the field name to compare to a value
* @param mixed $value the value to be used in comparison
* @param string $type the type name used to cast the value
* @param string $fields the fields to use to form a tuple
* @param array|ExpressionInterface $values the values to use to form a tuple
* @param array $types the types names to use for casting each of the values, only
* one type per position in the value array in needed
* @param string $conjunction the operator used for comparing field and value
* @return void
*/
public function __construct($field, $value, $type = [], $conjuntion = '=') {
parent::__construct($field, $value, $type, $conjuntion);
public function __construct($fields, $values, $types = [], $conjuntion = '=') {
parent::__construct($fields, $value, $type, $conjuntion);
$this->_type = (array)$type;
}

Expand Down

0 comments on commit e109c7c

Please sign in to comment.