php - How do you handle Zend_Paginator? -
I was watching Zend_Paginator using MVC in the Zend Framework project, and it looks like an intermediate tool.
It seems that we can give a selected object as a factory logic, it is interesting because it means that I should return a selected object from my model, is it a good way ?
It seems to be a bit heavy to do this, because it will not be required at all times ...
I can also give an array which, as a result of my law model Can come, but in this case where I have a lot of data, it can be complicated to get all the data from my database every time.
How do I manage it?
However, a single counting or supplying itself is counted. See the setRowCount () method in DbSelect Optimizer for more information.
and
In the case of a null adapter, you will have to give an item count to your constructor in exchange for a data collection.
I would recommend counting myself, and then manually setting it up. That is, I have just done it on the basis of reading. Apart from this, the doctor tells you that if you go on the NAL route, you can provide an item-count to the Pageinator constructor instead - it seems a little more appropriate to query for the number with each request. .
Comments
Post a Comment