Re: Automatic linking of constants

From: Date: Mon, 15 Jun 2015 18:38:28 +0000
Subject: Re: Automatic linking of constants
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385767@lists.php.net to get a copy of this message
On Mon, Jun 15, 2015 at 11:25 AM, Christoph Becker <cmbecker69@gmx.de> wrote: > Hi! > > I have quickly fixed doc bug #60971 by manually adding <link>s to the > constant IDs. I wonder if it would be possible to let PHD do this work > for <constant>, similar to how it's done for <function>. > > I would appreciate any hints where to look to add this feature in the > sources, about potential pitfalls, and what generally might have to be > taken into account. We index all <refname>s (function names) in the indexing stage. Then precompile the function map into a object property for easy lookup of functionname=>xml:id-chunk I don't think we currently index the constants as we don't have a very defined markup for constants. I imagine we could infer that a variablelist on chunk with the xml:id containing "constant" could maybe work... But that isn't really guaranteed, and may not pickup all or even pickup wrong things... -Hannes

« previous php.doc (#969385767) next »