From: Martín Marrese Date: Wed, 3 Sep 2003 18:24:50 +0000 (+0000) Subject: Termine con la documentacion X-Git-Tag: svn_import~29 X-Git-Url: https://git.llucax.com/mecon/scripts.git/commitdiff_plain/0535486f276ca3c56cea35af4860af084a8dae1c?ds=inline Termine con la documentacion --- diff --git a/code2xmi/README b/code2xmi/README index 0b17994..2626ab4 100644 --- a/code2xmi/README +++ b/code2xmi/README @@ -4,8 +4,19 @@ CODE2XMI Script that parse a php file and creates from it the classes (with its attributes and functions) that are in the file. -This script generates a light xmi file. This xmi file will include all the -classes, the functions and the attributes that are content in the php file. +This file will receive a directory or a list of archives as argument. +The directory search is not recursive so if you want to parse it recursively +you may use the find command to solve this. +Example: ./code2xmi HTMl/ +Example: ./code2xmi Table.php Form.php etc +Example: ./code2xmi `find HTML/ -name '*.php'` + +The output will be a single file named umlOut.xmi and it will be generated in +the same path were the script was run. + +This script generates a light xmi file (Class only no diagrams will be +generated). This xmi file will include all the classes, the functions and the +attributes that are content in the php file. All the documentation that belongs to a class or a function or an attribute is attached to it in the corresponding xmi line, so when you open the xmi file you will have your object with all the information that matters. @@ -33,3 +44,4 @@ Example of a wrong line: function parseParenthesis( param1, This line must be written this way: function parseParenthesis(param1, param2=null) +For a complete example you may check the Tabla.php archive. diff --git a/code2xmi/code2xmi.php b/code2xmi/code2xmi.php index 0fb2ea7..08a869c 100755 --- a/code2xmi/code2xmi.php +++ b/code2xmi/code2xmi.php @@ -127,7 +127,7 @@ for ($j = 1; $j < count($argv); $j++) { $options['type'] = $type; //If there is more documentation, I add it to the main documentation if (trim($rest)) { - $options['documentation'].= "Returns: ".trim($rest); + $options['documentation'].= "Returns: ".trim($rest)."\n"; } $doc_param = 0; $rest = '';