Source for file ClassList.php
Documentation is available at ClassList.php
* Class and method list for a given package directory.
* @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: ClassList.php,v 1.3 2007/07/18 18:52:44 cweiske Exp $
* @link http://pear.php.net/package/QA_Peardoc_Coverage
protected static $arBadFiles = array (
'/generate_package_xml.php',
'/generate_package2_xml.php',
'/generatePackage.xml.php',
'/DBA_Relational/Toolbox.php',
'/Gtk_Styled/Buttons.php',
'/HTTP_WebDAV_Client/Client.php',
'/HTTP_WebDAV_Server/file.php',
'/MDB_Frontend/Common.php',
'/MDB_Frontend/Dump.php',
'/MDB_Frontend/Frontend.php',
'/MDB_Frontend/Login.tpl.php',
'/MDB_Frontend/Update.php',
'/PEAR_Frontend_Web/WebInstaller.php',
'/PHP_Parser/skeleton.php',
'/PHP_ParserGenerator/Lemon.php',
'/PHP_ParserGenerator/parsephp.php',
'/PhpDocumentor/phpdoc.php',
'/SQL_Parser/Dialect_.+.php',
'/Science_Chemistry/Chemistry.php',
'/Services_Weather/buildMetarDB.php',
'/Translation/translation.str_mgmt.php',
'/XML_HTMLSax/XML_HTMLSax.php',
'/DBA/DBA/Compatibility.php',
'/DB_DataObject/DataObject/createTables.php',
'/HTML_AJAX/js/build.php',
'/HTML_Page/Page/Doctypes.php',
'/HTML_Page/Page/Namespaces.php',
'/HTML_Page2/Page2/Doctypes.php',
'/HTML_Page2/Page2/Namespaces.php',
'/HTTP_SessionServer/SessionServer/SaveHandler.php',
'/I18N/Messages/determineLanguage.inc.php',
'/Image_Graph/Graph/Config.php',
'/Image_Graph/Graph/Constants.php',
'/Image_Transform/Driver/.+.php',
'/Image_Transform/imgtests/.+.php',
'/MDB/MDB/reverse_engineer_xml_schema.php',
'/Math_Fibonacci/Fibonacci/_fibonacciTable.php',
'/Net_GameServerQuery/GameServerQuery/Games.php',
'/Net_SmartIRC/SmartIRC/defines.php',
'/PEAR_Frontend_Gtk2/Gtk2/Checks.php',
'/PHP_CompatInfo/CompatInfo/',
* Returns a list of .php files in the given
* directory and its subdirectories.
* The files do not match self::$arBadFiles.
* @param string $strPackageDir Directory to scan
* @param boolean $bAbsolute Return absolute file paths
* (or relative to package dir)
* @return array Array with absolute file paths
public static function getFileList($strPackageDir, $bAbsolute = true )
"Package directory does not exist: " . $strPackageDir
if (substr($strPackageDir, -1 ) != '/') {
'!(' . implode(self ::$arBadFiles, '|') . ')!',
glob ('./' . '{*,*/*,*/*/*,*/*/*/*}.php', GLOB_BRACE ),
foreach ($arFiles as $id => $strFile) {
$arFiles[$id] = $strPackageDir . substr($strFile, 2 );
$arFiles[$id] = substr($strFile, 2 );
}//public static function getFileList($strPackageDir, $bAbsolute = true)
* Tries to find classnames in a given file
* @param string $strClassFile .php filename
* @return array Array of classnames defined in the file
//simple: open file and search for "class classname"
. '\\s*(?:abstract\\s+)?(?:final\\s+)?'
. '(?:[Cc]lass|interface)\\s+([A-Za-z0-9_]+)/',
}//public static function getClassnamesFromFilename($strClassFile)
}//class QA_Peardoc_Coverage_Classlist
Documentation generated on Mon, 11 Mar 2019 15:10:39 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|