phpdoc

PHPDoc does not seem to recognize global variables in output. What am I doing wrong?

柔情痞子 提交于 2020-01-06 15:41:43
问题 I have the following in my code /** * The primary database connection object * * @global object $GLOBALS['db'] * @name $db */ global $db; Now you would think that this would be sufficient, but when I run phpdoc, there is no mention of this variable anywhere in the documentation or any other global variable. What gives? This is straight out of the documentation. Why isn't it recognizing and recording this variable as a global? As a secondary question, it seems you ought to be able to reference

PHPDoc does not seem to recognize global variables in output. What am I doing wrong?

断了今生、忘了曾经 提交于 2020-01-06 15:40:15
问题 I have the following in my code /** * The primary database connection object * * @global object $GLOBALS['db'] * @name $db */ global $db; Now you would think that this would be sufficient, but when I run phpdoc, there is no mention of this variable anywhere in the documentation or any other global variable. What gives? This is straight out of the documentation. Why isn't it recognizing and recording this variable as a global? As a secondary question, it seems you ought to be able to reference

Eclipse completions - @var (PHPDoc) question

心已入冬 提交于 2020-01-02 06:32:49
问题 I have strange problem. When I use @return Model\Article in the model-loading method then I see the model's methods in autocomplete of Eclipse. The model-loading method returns more objects so I want it to @return My\BaseModel and then put the /* @var $model Model\Article */ for each model specificaly (when I use it). The problem is that the @return Model\Article works well (I see Model\Article + My\BaseModel methods) but the other way ( @return My\BaseModel and inline /*...*/ ) doesn't - it

Fill @version tag with subversion in Eclipse

落爺英雄遲暮 提交于 2019-12-30 04:24:10
问题 I would like to fill the comment tag @version with Subclipse or Subversion in Eclipse. CVS has done this automatically but Subversion isn't. This would be very helpful. I tried to google "@version" but it seems impossible. Example what CVS did: <?php /* * @author Spankmaster * @version $Id: file.php,v 1.47 2009-09-21 09:28:49 sp Exp $ * @package mysoftware */ Example with SVN: <?php /* * @author Spankmaster * @version $Id: $ -> stays empty * @package mysoftware */ Please help..... 回答1: in svn

Is there a way for phpDoc to document an array of objects as a parameter?

你离开我真会死。 提交于 2019-12-29 06:36:39
问题 In phpDoc-generated documentation I can cause phpDoc to generate a link to a custom type definition for a given param using @param CustomType $variablename and that works great. However, the code I'm currently documenting requires CustomType[] parameters, i.e. an array of said CustomType. I want the documentation to be clear that an array is required, but when I use @param CustomType[] $variablename phpDoc no longer recognizes the type, and thus can't link to it's definition. This is pretty

Comment associative array in PHP Documentor

与世无争的帅哥 提交于 2019-12-28 04:13:09
问题 I use several associative arrays in my PHP application and I'm using PHP documentor to comment my sources. I never really did specify comments for the arrays in an array, but now I need to do that and don't know how. $array = array('id' => 'test', 'class' => 'tester', 'options' => array('option1' => 1, 'option2' => 2)) How do I comment this array in the correct way for @var and @param comments? I could do this like this, but I don't know if this is correct: @param string $array['id'] @param

Comment associative array in PHP Documentor

若如初见. 提交于 2019-12-28 04:13:07
问题 I use several associative arrays in my PHP application and I'm using PHP documentor to comment my sources. I never really did specify comments for the arrays in an array, but now I need to do that and don't know how. $array = array('id' => 'test', 'class' => 'tester', 'options' => array('option1' => 1, 'option2' => 2)) How do I comment this array in the correct way for @var and @param comments? I could do this like this, but I don't know if this is correct: @param string $array['id'] @param

Binding PHP documenter script to <C-P> in Vim

半城伤御伤魂 提交于 2019-12-24 15:22:07
问题 As suggested in an answer here: VIM Insert PHPdoc automatically I was trying to bind Ctl p to the PHP documenter script in order to generate comments. I used these lines at the end of my .vimrc file: " PHP documenter script bound to Control-P autocmd FileType php inoremap <C-P> <ESC>:call PhpDocSingle()<CR>i autocmd FileType php nnoremap <C-P> :call PhpDocSingle()<CR> autocmd FileType php vnoremap <C-P> :call PhpDocRange()<CR> But when I press Ctl p , the cursor goes to the line before and

Php with NetBeans: Applying new PhpDoc without the actual declaration

醉酒当歌 提交于 2019-12-24 03:36:13
问题 Is there a way to apply new PhpDoc without redeclaration of method, for instance I have a class which: class GeneralContainer { private $children; public function __construct() { $this->children = $this->CreateChildren(); } protected function CreateChildren() { return new GeneralChildren($this); } /** * @return GeneralChildren */ public function Children() { return $this->children; } } After overriding the "CreateChildren" method the following way: class SpecializedContainer extends

Don't get GraphViz and phpDocumentor to work

旧时模样 提交于 2019-12-24 02:44:15
问题 I'm trying to create a php documentation on my local XAMPP host (on Windows 7) with phpDocumentor.phar (v2.). It gives me (after parsing all the files) this error: Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path? I searched a lot, but nothing helps. What does 'path' means? If I open a command box at any location I can start the dot.exe (which gives me no output but waiting prompt). In my environment path variable the bin folders