Advertising
- PHP Auto Documentor
- Friday, November 7th, 2008 at 1:35:50pm MST
- <?php
- include("conf/initiate.php");
- include_once HCo_Registry::getParam('Config','file_dir')."/libs/HCo_Admin.class.php";
- // instantiate the class
- $Admin = new HCo_Admin();
- // read the file into an array
- $fileLines = file('libs/HCo_Admin.class.php');
- // get the class methods (internal method) easier to search this way
- $methods = get_class_methods($Admin);
- // go through all the methods
- foreach($methods as $m) {
- // get the method
- $meth = new ReflectionMethod('HCo_Admin', $m);
- $args = $meth->getParameters();
- $comment = "
- /**
- * ".$meth->getName()." : xX_INFO_Xx
- *";
- foreach($args as $a) {
- $as = explode('=',$a);
- $def = rtrim($as[1], "]");
- if($def == "") $def = '""';
- $comment .= "
- * @param integer $".$a->getName()." xX_INFO_Xx";
- }
- $comment .= "
- * @access public
- * @return array
- **/
- ";
- $fileLines[$meth->getStartLine()-2] = $comment;
- }
- $h = fopen('libs/documentorOutput.class.php','w');
- fwrite($h, implode($fileLines));
- fclose($h);
- ?>
- Output sent to documentorOutput.class.php
Paste Details
Tags: php phpdocumentor
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.