-
Notifications
You must be signed in to change notification settings - Fork 3
Remove usage of Timber\PostCollection in Repository #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice update, we should remove the mention of PostCollection
from the doc blocks as well.
$this->result_set
is an array, maybe we should lock the return value of $this->do_query()
to be of type array
instead of mixed? Cc @lusimeon @ptt-homme
070465c
to
a9d8801
Compare
All docblock comment's have been updated ! |
template/web/wp-content/themes/<%= slug %>/app/Repositories/Repository.php
Show resolved
Hide resolved
* | ||
* @return array|PostCollection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Should we keep ArrayObject
as an allowed type?
The PostQuery
and PostCollection
classes are base on PHP's ArrayObject
class. Allowing the usage of ArrayObject
results could help implement PostCollection
or PostQuery
in child classes.
Maybe we can discuss this next monday?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, can plan a meeting on the topic !
There is no PostQuery
or PostCollection
logic in this class since the do_query()
method is to implement.
This could lead to some implementation with direct SQL query with wpdb
for example
e4d09f8
to
e15869c
Compare
Any update on this merge request ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems good to me, I guess we will have to test it to see if the design is good.
adac180
to
ad15ecd
Compare
ad15ecd
to
0abde0d
Compare
Motivation:
The abstract
Repository
must be more generic.Removed
Timber\PostCollection
are removedRepository->slice()
method is remove.Closes #53 and #54