Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[RFC] Criterion subclasses #41

Closed
fzaninotto opened this Issue Nov 10, 2011 · 3 comments

Comments

Projects
None yet
3 participants
Member

fzaninotto commented Nov 10, 2011

The Citerion and ModelCriterion code is a mess. The dispatchPsHandling() cries for subclasses. I suggest that the code from this method moves up to Criteria, at the Criterion creation, so as to instanciate various Criterion subclasses (e.g. CriterionLike, CriterionIn, CriterionRaw, etc.), each having a dedicated and clean appendPsTo() method.

Member

hhamon commented Nov 10, 2011

Makes sense to me.

@ghost ghost assigned fzaninotto Nov 16, 2011

Member

fzaninotto commented Nov 16, 2011

Ok, accepted. I'll implement it.

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move Criteria::CUSTOM logic to a specialized Criterion class
Refs #41.
0d11167

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move Criteria::IN and Criteria::NOT_IN logic to a specialized Criteri…
…on class

Refs #41.
feecdb8

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move Criterion subclasses to a subnamespace.
Because the boss said so.

Refs #41.
8f56644

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move Criteria::RAW logic to a specialized Criterion class
Refs #41.
0b56b03

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move Criteria::LIKE and Criteria::NOT_LIKE logic to a specialized Cri…
…terion class

Refs #41.
d91ff7b

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Move logic for Criteria::EQUAL and the likes to a specialized Criteri…
…on class

Refs #41.
f99f1c3

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 26, 2012

@fzaninotto fzaninotto Rename Criterion to AbstractCriterion
Refs #41.
868b175

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Add comment to abstract method
Refs #41.
dec97eb

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Fix CS of new Criterion classes (using php-cs-fixer)
Refs #41.
e7ca5bb

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Use custom exceptions instead of standard ones for Criterion errors.
Refs #41.
927f95c

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Rename ModelCriterion to Criterion\BaseModelCriterion
Refs #41
82f9b50

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Move MODEL_CLAUSE and MODEL_CLAUSE_LIKE logic to specialized ModelCri…
…terion classes

Refs #41.
869c088

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Move MODEL_CLAUSE_SEVERAL logic to specialized ModelCriterion classes
Refs #41.
0f1c2ec

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Move MODEL_CLAUSE_ARRAY and MODEL_CLAUSE_RAW logic to specialized Mod…
…elCriterion classes

Refs #41.
b40b80b

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Rename BaseModelCriterion to AbstractModelCriterion
Refs #41.
f9f13f2

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Fix Bad Criterion subclass names.
Refs #41.
9a0720e

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 27, 2012

@fzaninotto fzaninotto Fix CS on new Criterion classes.
Thanks php-cs-fixer!

Refs #41.
b01218e

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 28, 2012

@fzaninotto fzaninotto Add unit tests for all new ModelCriterion subclasses.
Refs #41.
1160843

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 28, 2012

@fzaninotto fzaninotto Refactoring AbstractCriterion classes
Refs #41.
ee7d45f

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 28, 2012

@fzaninotto fzaninotto Change constructor signature for new ModelCriterion classes
Refs #41.
5626597

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 28, 2012

@fzaninotto fzaninotto Refactor ModelCriteria instaciation of ModelCriterions
Refs #41.
571d010

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 28, 2012

@fzaninotto fzaninotto Final cleanups and optimizations in ModelCriterion logic
Refs #41
ab1ffa3

@willdurand willdurand closed this Jul 30, 2012

Owner

willdurand commented Jul 30, 2012

Hurray! Achievement unlocked!

@fzaninotto fzaninotto added a commit to fzaninotto/Propel2 that referenced this issue Jul 30, 2012

@fzaninotto fzaninotto Remove useless else after return
Refs #41.
7649ef7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment