activeFile = $thiz->activeFile; $thiz->classes[$thiz->_active_class]->Attributes[$c->name] = $c; $thiz->classes[$thiz->_active_class]->Attributes[$c->name]->class = $thiz->classes[$thiz->_active_class]->name; } } function parse(PHP_CodeDoc_Parser $thiz) { // read var declares in a class $flags= array($thiz->look_nws(-1), $thiz->look_nws(-2), $thiz->look_nws(-3), $thiz->look_nws(-4)); $startpos = $thiz->pos; $var = new PHP_CodeDoc_Data_Var; $var->name = $thiz->tokens[$thiz->pos+2][1]; $var->type = "Public"; $var->isPublic = 1; $var->isStatic = 0; $var->visibility = 1; $var->isConstant = $thiz->tokens[$thiz->pos][0] == T_CONST; if (in_array(T_PRIVATE, $flags)) { $var->type = "Private"; $var->isPublic = 0; $var->visibility = 0; } if (in_array(T_PROTECTED, $flags)) { $var->type = "Protected"; $var->isPublic = 0; $var->visibility = 0; } if (in_array(T_STATIC, $flags)) { $var->isStatic = 1; } $var->visibility = 1; PHP_CodeDoc_Parser_Var::_store_tokens($thiz, $var); if ($v = PHP_CodeDoc_Parser_Comment::parse($thiz)) { $var->description = $v; } $thiz->pos = $startpos; return $var; } /* remember the tokens for a var.. (for printing later) */ function _store_tokens(PHP_CodeDoc_Parser $thiz, &$var) { //return; $var->tokenStart=$thiz->pos; $n=0; $in_method =0; $inbrak =0; $level=0; $pos = $thiz->pos; while ($pos < $thiz->total) { $v = $thiz->tokens[$pos]; if (!is_array($v)) { if (trim($v) == ";") { $var->tokenEnd = $pos; return; } } $var->tokens[$n] = $v; $pos++; $n++; } $var->tokenEnd = $pos; } }