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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:19:38+00:00 2026-06-02T18:19:38+00:00

I have implemented entities within the Symfony2 framework that are annotated to be used

  • 0

I have implemented entities within the Symfony2 framework that are annotated to be used by Doctrine. For example:

/*
 * class description
 *
 * @ORM\Entity(repositoryClass="Website\ContentBundle\Repository\ContentRepository")
 * @ORM\HasLifecycleCallbacks()
 * @ORM\InheritanceType("SINGLE_TABLE")
 * @ORM\DiscriminatorColumn(name="type", type="string")
 * @ORM\DiscriminatorMap({"article" = "Article"})
 * @ORM\Table(name="content",indexes={@ORM\index(name="id_UNIQUE",columns={"id"})})
 */
 class Content {
    /** 
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    ...
  }

When I run Doxygen on my source code, the documentation is not very readable. I have tried to define aliases for each @ORM* symbol; for example “ORM=ORM”, “Entity=Entity”, and so on. But this does not work. For the above mentioned class Doxygen returns

...
ORMEntity(repositoryClass="Website\ContentBundle\Repository\ContentRepository") ORM() ORM("SINGLE_TABLE") ORM(name="type", type="string") ORM({"article" = "Article", "picture_series" = "PictureSeries", "event" = "Event", "invitation" = "Invitation"}) ORMTable(name="content",indexes={ORM(name="id_UNIQUE",columns={"id"})}) 

With respect to method

/**
* sets the given id 
* 
* @param number $id
* @return \Website\ContentBundle\Entity\Content
*/
public function setId($id) {
    $this->id = $id;
    return $this; // fluent interface
}

Doxygen creates

setId ($ id)    
   sets the given id

Parameters:
    number  $id 

Returns:

Why does it not show the \Website\ContentBundle\Entity\Content after “Returns:”?

Maybe someone can give me a hint or a link on how to configure Doxygen such that it can handle the @ORM annotations appropriately.

THX in advance!

  • 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-02T18:19:39+00:00Added an answer on June 2, 2026 at 6:19 pm

    With respect to the question

    Why does it not show the \Website\ContentBundle\Entity\Content after Returns:?

    This is probably because doxygen commands start with a \, do doxygen thinks you are calling some commands which it does not recognise, and so presumably strips from the documentation and does nothing with.

    You were on the right line with attempting to use the ALIASES configuration file option. However, instead of defining ORM=ORM try using ORM=\@ORM. I got your example source code to be documented by doxygen without any warnings by defining the following aliases:

    ALIASES  = "ORM=\@ORM"  
    ALIASES += "Entity=\\Entity"  
    ALIASES += "InheritanceType=\\InheritanceType"  
    ALIASES += "DiscriminatorColumn=\\DiscriminatorColumn"  
    ALIASES += "DiscriminatorMap=\\DiscriminatorMap"  
    ALIASES += "Table=\\Table"  
    ALIASES += "Id=\\Id"  
    ALIASES += "Column=\\Column"  
    ALIASES += "GeneratedValue=\\GeneratedValue"  
    ALIASES += "index=\\index"  
    ALIASES += "HasLifecycleCallbacks=\\HasLifecycleCallbacks"  
    ALIASES += "Repository=\\Repository"  
    ALIASES += "ContentRepository=\\ContentRepository"  
    ALIASES += "ContentBundle=\\ContentBundle"  
    ALIASES += "Website=\\Website"  
    ALIASES += "Content=\\Content"  
    

    Here \\, \@ are actually doxygen commands for printing the backslash \ and @ characters respectively.

    Note, however, that the @ORM... directives will all appear on the same line. I’m not sure how to avoid this (update: see my edit below). Does anyone else have any ideas?

    Finally, as a side note, your documentation for $id should be

    * @param $id number 
    

    note the order of $id and number. See the documentation for \param.

    Edit: An alternative way of doing this would be to wrap the Doctrine relavent parts in \verbatim and \endverbatim tags. This will preserve the line breaks in your class description which will be more readable.

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

Sidebar

Related Questions

I have a abstract entity class that 3 slightly different entities implements. In my
I have the 2 following entities: @Entity @Table(name = brand) public class Brand {
If I'm using an ORM like JPA2 - where I have my entities that
I have the following entities: @Entity public class Alert implements Serializable { private long
I have a 'Customer' POCO entity within my Entity Framework 4 project. I want
I have two entities A and B: A.java: ... public class A implements Serializable
I have implemented a ToString() override method for my class in my Webservice and
I have implemented a sort of Repository class and it has has GetByID ,
I have implemented a printer delivery extension based on MS example in SSRS 2005.
I have an ASP.NET web site that has a entities version 4.0 DAL. I

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.