Post navigation

homeTOCupnextprev

API parsing

  1. Load the source file: refFunc->getFileName()
  2. Load the function: refFunc->getStartLine() to refFunc->getEndLine()
  3. Get tokens: token_get_all()
  4. Loop through each token calling a function to handle the token name
  • oikai_listsource() – List the source of the function
  • oikai_syntax_source() – Produce a nicely formatted version of the function’s source code
  • oikai_easy_tokens() – Display tokens
  • oikai_handle_token() – Handle this specific token
  • oikai_handle_token_T_CONSTANT_ENCAPSED_STRING() – Handle a T_CONSTANT_ENCAPSED_STRING token
  • oikai_handle_token_T_DOC_COMMENT() – Handle a T_DOC_COMMENT
  • oikai_handle_token_T_STRING() – Handle a T_STRING token
Notes: Another "doing it wrong". [apis d,b,c,a] not respecting the order in which the API names are typed. AND if you follow the links you'll find the links to WordPress API reference isn't right either. DOH! Herb 11 Nov 2013.