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 8437125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:20:58+00:00 2026-06-10T07:20:58+00:00

I document model classes (in PHP) with Doxygen. I am using Idiorm & Paris

  • 0

I document model classes (in PHP) with Doxygen. I am using Idiorm & Paris as an ORM and I would like the dynamic member variables (coming straight from the database) also to appear in the generated documentation.

Example: I have a model Group with some methods like isMember() or users() documented with Doxygen. In the database I have a table group with a field code among others. In Idiorm & Paris I can access it from a Group instance $group like this:

$group->code

How can I document code in Doxygen?

Edit: This question is similar to How to document a variable that isn't really there in Doxygen?, but it’s about dynamic members, not about variables.

Edit 2: I am unsure about the right terminology. It is a dynamic member variable or a dynamic property?

  • 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-06-10T07:21:00+00:00Added an answer on June 10, 2026 at 7:21 am

    Is it impossible to document non-existant class variables in Doxygen? I tried a naked

    /** @var User::email string 
      * Email address
      */
    

    without a corresponding $email; member variable in the class, but Doxygen valiantly ignored that. I didn’t find a command or something to force a documentation of a missing artifact.

    Therefore I experimented with creativedutchmen‘s suggestion, however Paris does not cope well with already existing member variables, because – I think – the PHP magic method __get() does not get triggered anymore. I see three possible fixes:

    1. unset() the documented member variables in the constructor. With get_class_vars(get_class($this)) this could be done in a parent class. Because my model classes all inherit from a parent class, this would be relatively straightforward.
    2. Modify Paris to ignore already set member variables, but I do not see how without unset().
    3. Name the member variables slightly differently, like appending an underscore, so they don’t conflict with the dynamic variables.

    Horrible kludges. To do something at runtime or have additional members to make documentation possible? No thanks.

    I decided to leave the situation as-is and document the model factory methods carefully instead. Most of the time the factory methods contains as parameters the class variables to be able to set them. And even if the factory method does not set all class variables, it is possible to document the missing variables in prose. The class documentation is also a good alternative.

    I award the bounty to creativedutchmen because of thinking out of the box, even if it didn’t help me in the end and because I don’t want the reputation points to get lost.

    tl;dr

    Don’t kludge. Document dynamic member variables in the factory method or in the class overview.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE : I updated the classes to look more like my actual model. When
I'm using XCode 3.1.4, I'd like to browse the iOS framework classes visually, eg.
Using Mongoid, let's say I have the following classes: class Map include Mongoid::Document embeds_many
I have model: # encoding: utf-8 class Tag include Mongoid::Document field :name, type: String
I have a model: class SimpleAction include Mongoid::Document field :set_date, :type => Date and
i have the following code in the rails company model: class Company include Mongoid::Document
When editing an Sweave document in LaTeX (using the Noweb mode), Emacs knows to
I'm using a WebBrowser control in design mode. webBrowser1.DocumentText = <html><body></body></html>; doc = webBrowser1.Document.DomDocument
I'd like to implement a filter/search feature in my application using Lucene. Querying Lucene
I'm trying to extend a few of my model classes to an Asset class.

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.