Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7528691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:27:06+00:00 2026-05-30T04:27:06+00:00

I use PHP and JavaScript in my project, which I entirely code with netbeans

  • 0

I use PHP and JavaScript in my project, which I entirely code with netbeans 7.0.1. I really like how netbeans includes and uses the JavaDoc commenting style, both for PHP and JS code.

Now, I want to generate the code documentation from PHP as well as JS code. I know there are several ways doing it, but my main aim is to have the documentation for both parts in one documentation.

To explain it further: So e.g., I could use Doxygen and process the PHP files and JsDoc to process the JS files. The result would be, that I now have two different docs in two different folders – a result which I don’t like. As I mentioned, I want both in one documentation.

So, first I went the way via using the doxygen helper js2doxy.pl (http://jsunit.berlios.de/internal.html), but that wasn’t flexible enough. It works well with “normal” defined functions, but not with anonymous js functions.

After a bit of trying a lot I thought why not alter the FILE_PATTERNS option of document to process .js files, as the JavaDoc style of the comments are nearly identical to the ones used with PHP. And well, the result looks promising, but some functions are missing in the doc.

Here are examples:

/**
 * Definitions for the languages.
 * @memberof Language
 */
Language.Definitions = (function()
{
...
}

This works very well, I can see the documentation. But:

**
 * Definitions for the languages
 * @memberof Language
 */
Language.Definitions = (function()
{
    var Translations = {};

    /**
     * Replaces strings.
     * @memberof Language
     * @param string translation Translation string 
     * @param array parameters (optional) List of parameters
     * 
     * @return string replaced string
     */
    function replaceStrings(translation, parameters)
    {
       ...
    }

In this example I see the docs for Language.Definitions but not for replaceStrings(). Do you have any idea, what I am doing wrong? The same construct is process by JsDoc very well.

Also (part of Language.Definitions) …

... 
return {
        /**
         * Initialize translations
         * 
         * @memberof Language
         */
        initTranslations: function()
        {
           ...
        } 
... 
}

… is not shown in the documentation.

I also wouldn’t mind if someone would show me how to best merge the two outputs of doxygen and JsDoc into one documentation.

Thanks a lot in advance!

Greetings!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:27:07+00:00Added an answer on May 30, 2026 at 4:27 am

    See the special command \fn to explicitly declare the function in the doxygen, preferably in the header of source, like this:

    /*!
     * Language
     * Declare the root class
     * \Class Language
     */
    
    /*! 
     * definitions is a property in the Language class
     * \property Definitions definitions
     */
    
    /*!
     * Document the Definitions static class that used as property in the Language class
     * \Class Definitions
     */
    
    /*!
     * Replaces strings
     * Document the static method for the Definitions class
     * \fn string replaceStrings(translation, parameters)
     * \memberof Definitions
     * \param string translation Translation string 
     * \param array parameters (optional) List of parameters
     * \return string replaced string
     */
    
    Language.definitions = (function()
    {
        var Translations = {};
    
        function replaceStrings(translation, parameters)
        {
           ...
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my code, I use JavaScript for UI and PHP for back end. I
The code is like this: <SCRIPT LANGUAGE=JavaScript> function showReview(){ //javascript stuff <?php $http=obj.href ='http://localhost/PROJECT1/thispage.php';
I'm working on a php project which uses Mysql, javascrit and jquery as technologies.
I want to use PHP to replace javascript functions in HTML documents. For example:
I want to use the thumbnail of the Google video's. In PHP or JavaScript
I have a PHP application that makes extensive use of Javascript on the client
I need to segment text using fullstops using PHP/Javascript.The problem is if I use
I've got a big project written in PHP and Javascript. The problem is that
I never used javascript, but I need it for my project. I would like
So I've got an AJAX project which uses the XmlHttpRequest object to dynamically retrieve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.