Reputation: 563
Im trying to document my framework with phpDocumentor v2. All is well except for constants. Here is my code:
// Define our site url
if( MOD_REWRITE )
{
/**
* The URL to get to the root of the website (HTTP_HOST + webroot)
*
* @package System
*/
define('SITE_URL', Request::BaseUrl());
}
else
{
/**
* @ignore
*/
define('SITE_URL', Request::BaseUrl() .'/?uri=');
}
The problem is that in the picture here:
Not only is SITE_URL printed twice (despite the @ignore tag on the second one), but also there is no description, and the constant isnt being stored under the "System" package as defined. The description, nor any phpdoc tags work for any of my defined contsants, yet every other doc block (functions and classes) work just fine. Does anyone know how to fix this?
Upvotes: 3
Views: 81
Reputation: 544
phpDocumentor see two constants. Better is defined constant only once in one place.
Better solution:
define('SITE_URL', Request::BaseUrl() . ( !MOD_REWRITE ? '/?uri=' : null ) );
Upvotes: 1