[Answered] How can I set attributes of the generated php classes as protected.

0 votes
asked Jun 17, 2014 in General Questions by ArielRodriguez (260 points)
recategorized Jun 26, 2014 by Martin Freki Stradej

Hello, We are learning to use Orm Designer 2 and we have come accross a difficulty.

I was wondering how can I set the visibility of the attibutes as protected instead of private so I can inherit between objets in my models. Can this be done?

Thank you in advance.

1 Answer

0 votes
answered Jun 18, 2014 by Martin Freki Stradej Skipper developer (74,840 points)
selected Jun 26, 2014 by Martin Freki Stradej
 
Best answer

Hi,

We have chosen the private visibility as default value with considerations of secure coding: methods should be private unless they are part of the API.

So the private setting is used automatically, in order to avoid compromising security by possible oversights.

However, once the annotations are generated for the first time, you can manually set up the visibility for any method/property necessary. On subsequent import and export, your new setting will not be removed or modified by ORM Designer.

commented Oct 14, 2014 by kukoman (340 points)

ok so i want to set all by default to protected or public, i don't really care about "security" implications, this fits my needs and project needs
lets say i have average 80 tables * 2-15 fields, and i really don't feel comfortable with changing it by hand or scripting :/
so how can i achieve this by default?

...