Source for file MethodList.php
Documentation is available at MethodList.php
require_once 'QA/Peardoc/Coverage/ClassList.php';
* Returns a method list for the class
* defined in the given filename.
* @package QA_Peardoc_Coverage
* @author Christian Weiske <cweiske@php.net>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @version CVS: $Id: MethodList.php,v 1.4 2007/07/18 18:52:44 cweiske Exp $
* @link http://pear.php.net/package/QA_Peardoc_Coverage
* Returns a class => method list for the classes
* defined in the given filename.
* @param string $strClassFile Path of a .php file to load
* @return array Array with classname => methods => bool array
throw new Exception ('File does not exist: ' . $strClassFile);
throw new Exception ('Please compile php with tokenizer enabled.');
$arClassnames = QA_Peardoc_Coverage_ClassList ::getClassnamesFromFilename ($strClassFile);
if (count($arClassnames) == 0 ) {
$bWaitForClassname = false;
$bWaitForMethodname = false;
$strClassName = '*funcs*';
list ($nId, $strText) = $token;
$bWaitForClassname = true;
} else if ($nId == T_FUNCTION ) {
$bWaitForMethodname = true;
} else if ($bWaitForClassname && $nId == T_STRING ) {
$strClassName = $strText;
$arMethods[$strClassName] = array ();
$bWaitForClassname = false;
} else if ($bWaitForMethodname && $nId == T_STRING ) {
$strMethodname = $strText;
//FIXME: check if docblock
//FIXME: use public methods only
$arMethods[$strClassName][$strMethodname] = false;
$bWaitForMethodname = false;
}//public static function getMethods($strClassFile)
}//class QA_Peardoc_Coverage_MethodList
Documentation generated on Mon, 11 Mar 2019 15:10:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|