libgraviton / php-rql-parser

A PHP RQL Parsing Library
15 stars 4 forks source link

MongoOdm constructor #63

Closed valerii-usachov closed 6 years ago

valerii-usachov commented 7 years ago

From README:Usage section:

/** @var \Doctrine\ODM\MongoDB\Query\Builder $builder */
$visitor = new \Graviton\Rql\Visitor\MongoOdm($builder);

MongoOdm doesn't have constructor and so it cannot set builder from constructor.

Add return $this; to setters.

Why is class MongoOdm final??

jc-src commented 7 years ago

Hello,

True, we have not updated the Readme, in commit: https://github.com/libgraviton/php-rql-parser/commit/45522d5140a801e5ac27891410984cc8d9a3598c We removed the constructor to be injected ( using setBuilder ).

Final, will check. Should not be needed indeed.

About the "setters", as we use this in SF service definition we have had no need to return this.