zend-db
zend-db copied to clipboard
Update Select.php
This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html
Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/6977 User: @alexandretaz Created On: 2014-12-08T17:32:57Z Updated At: 2014-12-10T14:55:05Z Body Adding the case on _get() magic methods to retrieve the Order Param, this can be useful to manipulate the order param, checking it before send a Query
Comment
User: @Ocramius Created On: 2014-12-08T17:33:46Z Updated At: 2014-12-08T17:33:46Z Body Requires a related test case.
Comment
User: @Pittiplatsch
Created On: 2014-12-08T18:54:18Z
Updated At: 2014-12-08T18:54:18Z
Body
I'm not sure if order should be exposed that way.
For highly sophisticated functionality depending on Select's internal data these can be retrieved via the method getRawState().
where and having which ARE exposed via __get() play a different role in this context: They are objects on their own which are frequently needed for standard use cases like incrementally adding conditions to an existing select object, whereas order is a plain array which cannot be modified in the same way anyway by magically __get()-fetching it (at least not atm where it isn't returned by reference).
Comment
User: @alexandretaz Created On: 2014-12-10T14:55:05Z Updated At: 2014-12-10T14:55:05Z Body @Pittiplatsch Exposing order make easy to manipulate the query when dealing with grids just sending a new Array; IMHO the total issue shoud be transform Order in a Object that implements ArrayObject and use it on the context of the query
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/107.