| @@ 276-289 (lines=14) @@ | ||
| 273 | * model's ID, while null values are ignored. |
|
| 274 | * @return self |
|
| 275 | */ |
|
| 276 | public function is($number) |
|
| 277 | { |
|
| 278 | if ($number === null) { |
|
| 279 | return $this; |
|
| 280 | } |
|
| 281 | ||
| 282 | if ($number instanceof Model) { |
|
| 283 | $number = $number->getId(); |
|
| 284 | } |
|
| 285 | ||
| 286 | $this->addColumnCondition("= ?", $number, 'i'); |
|
| 287 | ||
| 288 | return $this; |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * Request that a column equals one of some strings |
|
| @@ 330-340 (lines=11) @@ | ||
| 327 | * @param Model|int $model The ID or model you don't want to get |
|
| 328 | * @return self |
|
| 329 | */ |
|
| 330 | public function except($model) |
|
| 331 | { |
|
| 332 | if ($model instanceof Model) { |
|
| 333 | $model = $model->getId(); |
|
| 334 | } |
|
| 335 | ||
| 336 | $this->where('id'); |
|
| 337 | $this->addColumnCondition("!= ?", $model, 'i'); |
|
| 338 | ||
| 339 | return $this; |
|
| 340 | } |
|
| 341 | ||
| 342 | /** |
|
| 343 | * Return the results sorted by the value of a column |
|