Book a Demo

Author Topic: Some trouble with PHP  (Read 2810 times)

Markward Schubert

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Some trouble with PHP
« on: April 29, 2005, 09:03:26 am »
Hi !

I have some trouble with EA and PHP5.

1st:

When creating an aggregation, EA creates a member for the aggregated class automaticaly, which is nice. I figured out how to prevent the prefix "m_" from appearing in front of the member's name, but would like to customize the member's name in total. Is there a way to achieve this?

2nd:

What is the proper way to model interface-implementation. I used an aggregation-reference, which seems to work in EA, but when syncing with the code, EA removes my "implements MyFunnyInterface" all the time. Is this a shortage in PHP5-support, or do I have to model implementation differently ?


Thanks for any help in advance !

Regards

Markward





Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Some trouble with PHP
« Reply #1 on: May 01, 2005, 03:55:40 pm »
1. Tools | Options | Generation | Attribute/Operations

"Default name for associated attrib"

2. The realise link in the structure section of the toolbox.

Simon


Markward Schubert

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Some trouble with PHP
« Reply #2 on: May 02, 2005, 02:20:06 am »
Thanks for the reply.

I removed the Variable $LinkClass from the Codegeneration Dialog, to prevent EA from creating any member, which achieves what I wanted.

The second suggestion does not work for me though..

From the model`s perspective, the realize-Link works fine, even when reverse-engineering a class with

Code: [Select]
class MyClass implements MyInterface {
...
}


EA generates a realize-link to MyInteface, but when I generate the code from EA again, my
Code: [Select]
... implements MyInterface is removed again.


May this be a template-issue ?

Regards, Markward.





Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Some trouble with PHP
« Reply #3 on: May 02, 2005, 03:16:10 pm »
I think I know what your problem is.

Go to Tools | Options | Generation | PHP Specifications.

Set PHP version to 5.0.

If you don't have that set than your class attributes won't be generated correctly for PHP 5 either.

Simon


Markward Schubert

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Some trouble with PHP
« Reply #4 on: May 03, 2005, 01:16:33 am »
Hi !

Yes and thank you, that solved my problem.
Somehow it must have switched back to 4.0 after installing the updated version of ea.

When 5.0 is selected, the implements-statement is generated correctly.

May be a little annotation at this point:

The select-box seems to be broken, as it does not display the corresponding list, when I click on the  list-opener. I used the arrow-keys to select PHP 5.0.


Best Regards

Markward