Generating PHP code - documentation

PHP code instant generator automatically adds documentation to classes, operations and attributes.

<? /** * @access public */ class Company { /** * @AssociationType Employee * @AssociationMultiplicity 1..* */ public $employee = array(); } ?>

I know one can customize the VTL templates but the documentation is retrieved via .t_getDocumentation(…) method. Where does the method reach for the documentation. Is there a way to customize this so that for example attribute has only the following documentation:

<? class Company { /** * @var Employee */ public $employee = array(); } ?>

Many thanks!

Hi Stefda,

Thanks for your post. I’ll check with our engineers and come back to you once there is any feedback.

Best regards,
Lilian Wong

Hi Stefda,

Would you mind to send me a sample project and expectation based on your sample project so our engineers can understand your need precisely? Thanks in advance!

Best regards,
Lilian Wong

I have the same request as stefda, which is for the generated documentation for php to conform to the phpdoc syntax:
Tutorial: http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html
Manual: http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_manual.pkg.html

I have attached an archive with an example of the desired functionality:

  • phpdocexample.tar.gz - Example VP project
  • generated/*.php - The code generated by VP
  • expected/*.php - The generated code formatted to conform to phpdoc syntax

This example does not cover all of the possibilities for the generated documentation, just the basic class/attribute/operation stuff. It would be great if all of the generated documentation for php code conformed to the phpdoc syntax, or if we could have some degree of customization that would allow for this.

Thanks,
Kevin
phpdocexample.tar.gz

Hi Kevin,

Thanks for your post. I’ve forwarded the issue to our engineers to follow-up, and I’ll come back to you once there is any feedback.

Best regards,
Lilian Wong

Hi Stefda,

I apologize for my late response on this issue. Attached you can find a sample Instant Generator code template for PHP, and it can help you to generate the results you need.

Hope this helps. If there is anything else we can do to help, please feel free to ask.

Best regards,
Lilian Wong

I would like to use this as well, but I don’t see where the attachment is to download. Can you tell me how to get it?

I would like to use this as well, but I don’t see where the attachment is to download. Can you tell me how to get it?[/quote]

Same here. It would be nice, to have PHPDoc codetemplates, but sadly I can’t find anyithing in Lilians comments

1 year after this thread has begun, no PHP roundtrip possible in VP? :?:

so, can I write an interpreter file by myself? is this possible? I am really interested in