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 string $array['class']
@param int $array['options']['option1']
But how to do this for the @var
part?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…