Zend_CodeGenerator_Php_Property & Array

8 messages Options
Embed this post
Permalink
CocoRambo

Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
Hi all,

I recently try to use Zend_CodeGenerator to generate all my DbTables automatically.
All it's OK except for one thing!

I have multiple key for a primary key and I can't define a Zend_CodeGenerator_Php_Property which is an array?!

What I want:
protected $_myProperty = array('val1', 'val2');

What I have:
protected $_myProperty = 'array('val1', 'val2')';

There is a solution ?

Thanks
iceangel89

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
i also wanted to do something similar ... to generate models from MySQL infomation_schema

http://www.nabble.com/Zend_CodeGenerator-arrays-as-property-to23694912.html#a23719003

the workaround posted there

CocoRambo wrote:
Hi all,

I recently try to use Zend_CodeGenerator to generate all my DbTables
automatically.
All it's OK except for one thing!

I have multiple key for a primary key and I can't define a
Zend_CodeGenerator_Php_Property which is an array?!

What I want:
protected $_myProperty = array('val1', 'val2');

What I have:
protected $_myProperty = 'array('val1', 'val2')';

There is a solution ?

Thanks
Ralph Schindler-2

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
In reply to this post by CocoRambo
ah, you are correct, can you log an issue in the isssue tracker and
assign to me?

Effectively, we need to add type support to the php class properties,
should be easy to accomplish.  Right now its assuming everything is a
string.

I should be able to tackle this soon.

-ralph

CocoRambo wrote:

> Hi all,
>
> I recently try to use Zend_CodeGenerator to generate all my DbTables
> automatically.
> All it's OK except for one thing!
>
> I have multiple key for a primary key and I can't define a
> Zend_CodeGenerator_Php_Property which is an array?!
>
> What I want:
> protected $_myProperty = array('val1', 'val2');
>
> What I have:
> protected $_myProperty = 'array('val1', 'val2')';
>
> There is a solution ?
>
> Thanks
iceangel89

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
yay great!

Ralph Schindler-2 wrote:
I should be able to tackle this soon.
CocoRambo

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
It's done! I create the issue

Thanks

2009/6/10 iceangel89 <[hidden email]>

yay great!


Ralph Schindler-2 wrote:
>
> I should be able to tackle this soon.
>

--
View this message in context: http://www.nabble.com/Zend_CodeGenerator_Php_Property---Array-tp23922419p23954802.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Ralph Schindler-2

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
Not sure if you had checked the issue tracker, but this has been
implemented :)

-ralph

CocoRambo wrote:

> It's done! I create the issue
>
> Thanks
>
> 2009/6/10 iceangel89 <[hidden email] <mailto:[hidden email]>>
>
>
>     yay great!
>
>
>     Ralph Schindler-2 wrote:
>      >
>      > I should be able to tackle this soon.
>      >
>
>     --
>     View this message in context:
>     http://www.nabble.com/Zend_CodeGenerator_Php_Property---Array-tp23922419p23954802.html
>     Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
CocoRambo

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
I had checked ;)
Really thanks! Does it will be include in the next release/mini release?

2009/6/30 Ralph Schindler <[hidden email]>
Not sure if you had checked the issue tracker, but this has been implemented :)

-ralph

CocoRambo wrote:
It's done! I create the issue

Thanks

2009/6/10 iceangel89 <[hidden email] <mailto:[hidden email]>>



   yay great!


   Ralph Schindler-2 wrote:
    >
    > I should be able to tackle this soon.
    >

   --
   View this message in context:
   http://www.nabble.com/Zend_CodeGenerator_Php_Property---Array-tp23922419p23954802.html
   Sent from the Zend Framework mailing list archive at Nabble.com.



Ralph Schindler-2

Re: Zend_CodeGenerator_Php_Property & Array

Reply Threaded More More options
Print post
Permalink
Yes, although I have found another place where this applies, and might
need to refactor a bit.

Method signature parameters can have this as a defaultValue as well. SO
placement under Property/ doesn't make as much sense in that respect.

I will keep you updated.

-ralph

CocoRambo wrote:

> I had checked ;)
> Really thanks! Does it will be include in the next release/mini release?
>
> 2009/6/30 Ralph Schindler <[hidden email]
> <mailto:[hidden email]>>
>
>     Not sure if you had checked the issue tracker, but this has been
>     implemented :)
>
>     -ralph
>
>     CocoRambo wrote:
>
>         It's done! I create the issue
>
>         Thanks
>
>         2009/6/10 iceangel89 <[hidden email]
>         <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>>
>
>
>
>            yay great!
>
>
>            Ralph Schindler-2 wrote:
>             >
>             > I should be able to tackle this soon.
>             >
>
>            --
>            View this message in context:
>          
>          http://www.nabble.com/Zend_CodeGenerator_Php_Property---Array-tp23922419p23954802.html
>            Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
>