phpDoctor::_getProgramElementName PHP Method

_getProgramElementName() public method

Get the next program element name from the token list
public _getProgramElementName ( &$tokens, $key ) : str
return str
    public function _getProgramElementName(&$tokens, $key)
    {
        $name = '';
        $key++;
        while ($tokens[$key] && ($tokens[$key] == '&' || isset($tokens[$key][0]) && isset($tokens[$key][1]) && ($tokens[$key][0] == T_WHITESPACE || $tokens[$key][0] == T_STRING || $tokens[$key][0] == T_NS_SEPARATOR))) {
            if (isset($tokens[$key][1])) {
                $name .= $tokens[$key][1];
            }
            $key++;
        }
        return trim($name);
    }