Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: orhid1 on September 16, 2011, 02:20:10 pm

Title: PHP Code generation
Post by: orhid1 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.