Comment associative array in PHP Documentor
Posted
by Abenil
on Stack Overflow
See other posts from Stack Overflow
or by Abenil
Published on 2010-04-26T13:21:27Z
Indexed on
2010/04/26
13:23 UTC
Read the original article
Hit count: 241
Hey Guys, i hope someone can help me out on this one here. I use several associative arrays in my php application and i'm using to php documentor to comment my sources. I never really did specified comments for the arrays in an array, but now i need to do that and dont know how.
$array = array('id' => 'test', 'class' => 'tester', 'options' => array('option1' => 1, 'option2' => 2))
So how do i comment this array in the correct way for @var and @param comments? I could do this like this, but dunno, if this is correct:
@param string $array['id']
@param string $array['class']
@param int $array['options']['option1']
But how to this for the var part?
I hope someone can lead me to the right direction. Thanks in advance for any help.
Regards
© Stack Overflow or respective owner