vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   List all functions and arguments (https://vborg.vbsupport.ru/showthread.php?t=109737)

Princeton 03-07-2006 05:48 PM

List all functions and arguments
 
does anyone have a script that will list all functions/arguments found in files under a particular folder?

thanks

rossco_2005 03-07-2006 08:03 PM

You want it just to open all files in a folder, explode at 'function ' and then at ' ' to find all functions?
That shouldnt be too hard if you want it made.

Princeton 03-07-2006 08:33 PM

I'm currently not on my computer; but, if you have a script that is available that would be great

NOTE: it doesn't have to be perfect ...

rossco_2005 03-07-2006 09:33 PM

PHP Code:

<?php
function print_functions($file)
{
    echo 
"<h1>Functions in $file</h1>";
    
    
$file highlight_file($file,true);
    
$functions explode('<font color="#007700">function&nbsp;</font><font color="#0000BB">',$file);
    unset(
$functions[0]);
    foreach (
$functions AS $function)
    {
        
$name=explode('</font>',$function);
        echo 
$name[0].'<br />';
    }
}

print_functions('./vb354/includes/functions.php');
?>

Best I can come up wiht without spending too much time on it. :)

Princeton 03-07-2006 09:41 PM

thanks rossco ... not exactly what I was looking for :up:

I'm at home now so I'll take it from here.

thank you

rossco_2005 03-07-2006 10:05 PM

What did you want? :P

Let me know how it works out, I want to see the final code you come up with.


All times are GMT. The time now is 02:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00947 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete