I’m developing a web site using codeigniter framework. To document it, I’ve installed doxygen. Something weird is happening when doxygen meets files with the following structure:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* @class
* @brief The class brief
*/
class Catalogo extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('catalogomodel');
$this->load->library('img');
}
public function foo(){
..some code..
}
/* End of file catalogo.php */
/* Location: ./application/controllers/catalogo.php */
This is the only files that are been skipped, other files with the usual structure in codeigniter are documented as they should.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* @class
* @brief The class brief
*/
class Catalogo extends CI_Controller {
public function index(){
...some code to load models, libraries and views ...
}
/* End of file catalogo.php */
/* Location: ./application/controllers/catalogo.php */
I’m not sure how closely the examples you provided match your actual application, but for the original example code above:
Your class declarations do not appear to be closed (missing
}). This will prevent doxygen from parsing the class declaration, and it will be skipped. Adding the closing}allows doxygen to fully parse the class, and it should be included in the documentation, however no documentation will appear for the class or its member functions, and__constructwill not be listed as a member function.Once this change is made, Doxygen 1.8.0 reports two warnings while processing the contents:
The first is related to the empty
@classmarkup. Doxygen expects@classto be immediately followed by the class name that the comment applies to, and is typically used when the doxygen is not located next to the construct it describes. In this case,@classcan be removed since theCatalogoclass declaration immediately follows it. Alternatively, you can also specify@class Catalogoexplicitly. Making this change will silence the first warning, and will cause the documentation forCatalogoto appear in the doxygen output, however__constructwill still be absent andfoowill not be linked to a detailed description.To address the second warning, you’ll need to provide documentation for
foo, something like:This change will cause
footo appear in the documentation with a link to its detailed description.__constructwill still not be present, however adding similar documentation for it:causes both functions to appear with links to their detailed descriptions. This all assumes a default doxygen configuration (
doxygen -g) and Doxygen 1.8.0. The final code I tested (and which appears to work fine) was: