Book a Demo

Author Topic: PHP Code generation  (Read 3087 times)

orhid1

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
PHP Code generation
« on: September 16, 2011, 02:20:10 pm »
Hello I am using Enterprise Architect for PHP code generating and diagramming. I Think I discovered a bug. I noticed that when a file is required it is added before the namespace, this is illegal in PHP and so I have to go through all the files and edit them manually. Is this a bug or can it be fixed by some button or setting somewhere?  

Does anyone have any insight into this issue?

here is an example

Code: [Select]
<?php require_once("fileName.php");namespace someNameSpace;class Myclass Extends fileName&#123;    //some code goes in here methods and properties &#125;?>



The code should look like this
Code: [Select]
<?php namespace someNameSpace;require_once("fileName.php");class Myclass Extends fileName&#123;    //some code goes in here methods and properties &#125;?>





The namespace has to be declared on the first line of the file. The code generator however declares the namespace after the the included files.

Thank you for any responses.
« Last Edit: September 16, 2011, 02:20:25 pm by orchid1 »