Quantcast

ZF2: Array support in TableGateway

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

ZF2: Array support in TableGateway

henit
This post was updated on .
Hi.

In ZF2 beta5, Zend\Db\Sql\Select has been extended to support an array as argument for from. This is very good, for instance for table alias like:

$select->from(array('t' => 'table'));

However, the table argument for the contructor in Zend\Db\TableGateway\TableGateway still only support string and TableIdentifier (like Select did in beta4).

I use TableGateway with selectWidth, but since the table identifier of the select object sent to selectWidth must be identical to the one sent to the constructor of TableGateway, I can't use array for the select object. So my suggestion is to extend TableGateway to support array the same way as Select.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Array support in TableGateway

ralphschindler
I don't see why this would be a problem, could you fork the repository
and issue a pull request for the feature?

-ralph

On 7/17/12 2:52 AM, henit wrote:

> Hi.
>
> In ZF2 beta5, Zend\Db\Sql\Select has been extended to support an array as
> argument for from. This is very good, for instance for table alias like:
>
> $select->from('t' => 'table');
>
> However, the table argument for the contructor in
> Zend\Db\TableGateway\TableGateway still only support string and
> TableIdentifier (like Select did in beta4).
>
> I use TableGateway with selectWidth, but since the table identifier of the
> select object sent to selectWidth must be identical to the one sent to the
> constructor of TableGateway, I can't use array for the select object. So my
> suggestion is to extend TableGateway to support array the same way as
> Select.
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Array-support-in-TableGateway-tp4655789.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>


--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Loading...