Answer the question
In order to leave comments, you need to log in
Kick my Yii2 extension and is there an analogue of regular expressions in PHPDoc?
I made an
extension
for
Yii2 https://github.com/phpshko/yii2-magic-scopes do not create for example your UserQuery.
Question about PHPDoc. 36 rows are created for each field. If there are too many columns in the database, then all this grows very strongly.
I was looking for an opportunity to somehow set the name of the method with regular expressions, but I found only people who were also looking for a way out.
Maybe someone will have an idea how to do something similar.
I would like to hear constructive criticism, maybe some advice.
Thanks in advance. ->andWhere(['between', 'year', 1980, 2000])
->andYearBetween(1980, 2000)
Answer the question
In order to leave comments, you need to log in
1. I recommend mapping methods at the time of init(), and cache the result.
2. It is better to take methods out of call, it is rather difficult to read it.
3. You don't have input parameter checks. ->idIn(new stdClass, 'b'), It will easily pass to andWhere, which is not good.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question