Table = $Table; $this->Column = $Column; $this->Comparison = $Comparison; $this->Value = $Value; $this->ComparisonFormatter = $ComparisonFormatter; if($this->ComparisonFormatter == null) $this->ComparisonFormatter = new StringComparisonFormatter(); } public function CreateComparison() { $leftSide = $this->Table . '.' . ($this->Column == '' ? 'value' : $this->Column); switch ($this->Comparison) { case 'IsChecked': return $leftSide . '= 1'; case 'IsNotChecked': return $leftSide . ' is null'; } } }