QA_Peardoc_Coverage
[ class tree: QA_Peardoc_Coverage ] [ index: QA_Peardoc_Coverage ] [ all elements ]

Class: QA_Peardoc_Coverage

Source Location: /QA_Peardoc_Coverage-1.1.1/QA/Peardoc/Coverage.php

Class Overview


Simple peardoc coverage analysis.


Author(s):

Version:

  • CVS: $Id: Coverage.php,v 1.11 2007/07/18 18:52:44 cweiske Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 59]
Simple peardoc coverage analysis.

Compares the classes and methods in PEAR packages with the PEAR documentation, trying to find out which packages aren't documented at all, where documentation of parts is lacking or which packages are fully documented.

IDs in peardoc: --------------- $packagename has "_" replaced with "-"

= Class: package.$category.$packagename package.html.html-form package.$category.$shortpackagename package.gtk.filedrop

= Methods: package.$category.$packagename.$methodname package.html.html-template-it.show package.html.html-template-it.show.desc package.html.html-template-it.show.parameter package.html.html-template-it.show.throws package.$category.$packagename.$classname.$methodname package.html.html-quickform.html-quickform.addelement

= Constructor: package.$category.$packagename.constructor package.gtk2.entrydialog.constructor package.$category.$packagename.$classname.$classname package.datetime.calendar.calendar-day.calendar-day



[ Top ]


Class Variables

$arCategoryAssociation = array(
        'benchmark'                 => 'benchmarking',
        'calendar'                  => 'datetime',
        'games_chess'               => 'structures',
        'genealogy_gedcom'          => 'fileformats',
        'fsm'                       => 'processing',
        'i18nv2'                    => 'internationalization',
        'inline_c'                  => 'php',
        'math_numbers'              => 'numbers',
        'message'                   => 'encryption',
        'mime_type'                 => 'tools',
        'ole'                       => 'structures',
        'pager'                     => 'html',
        'pager_sliding'             => 'html',
        'pecl_gen'                  => 'php',
        'phpdoc'                    => 'php',
        'phpdocumentor'             => 'php',
        'safe_html'                 => 'html',
        'search_mnogosearch'        => 'tools',
        'selenium'                  => 'testing',
        'spreadsheet_excel_writer'  => 'fileformats',
        'sql_parser'                => 'database',
        'translation'               => 'internationalization',
        'translation2'              => 'internationalization',
        'tree'                      => 'structures',
        'xml_rpc'                   => 'webservices',
        'xml_rpc2'                  => 'webservices',
    )

[line 67]

Special category associations.

key: package name value: category name

  • Access: public

Type:   mixed


[ Top ]

$arCategoryDocNames = array(
        'archive'       => 'fileformats',
        'auth'          => 'authentication',
        'cache'         => 'caching',
        'codegen'       => 'tools',
        'config'        => 'configuration',
        'contact'       => 'fileformats',
        'crypt'         => 'encryption',
        'date'          => 'datetime',
        'db'            => 'database',
        'dba'           => 'database',
        'file'          => array('fileformats', 'filesystem'),'i18n'=>'internationalization','image'=>'images','liveuser'=>'authentication','log'=>'logging','mdb'=>'database','mdb2'=>'database','mp3'=>'fileformats','net'=>'networking','rdf'=>'semanticweb','services'=>'webservices','soap'=>'webservices','stream'=>'streams',)

[line 104]

List with package category name => Doc category name associations.

Doc category assignments may be arrays of strings.

  • Access: public

Type:   array


[ Top ]

$arIgnoredPackages = array(
        'forum',
        'html_oohform',
        'installphars',
        'perm_liveuser',
        'xml_annotea'
    )

[line 134]

Lowercase package names that should be ignored.
  • Access: public

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 151]

QA_Peardoc_Coverage __construct( string $strManualPath, string $strPearDir)

Creates a new coverage checker instance.
  • Access: public

Parameters:

string   $strManualPath   —  Full path to the manual.xml file of the pear documentation.
string   $strPearDir   —  Path of PEAR CVS checkout directory

[ Top ]

existsId   [line 394]

boolean existsId( string $strId)

Checks if an id exists in the manual
  • Return: True if it exists, false if not
  • Access: public

Parameters:

string   $strId   —  XML id="" to check

[ Top ]

generateCoverage   [line 164]

array generateCoverage( )

Generates the coverage analysis
  • Return: Documentation coverage array. Pass it to a render() method.
  • Access: public

[ Top ]

getCategory   [line 317]

string getCategory( string $strPackage)

Returns the category name for the package.
  • Return: Array with category names (lowercase)
  • Access: public

Parameters:

string   $strPackage   —  Package name (e.g. Gtk2_EntryDialog)

[ Top ]

getPackageCoverage   [line 421]

array getPackageCoverage( string $strPackage, string $strCategory, string $strBaseId, string $strPackageDir)

Creates the documentation coverage for the given package.

A class is considered documented if either an ID /baseid + "." + classname/ exists, or the classname is surrounded by <classname> tags at least once.

Functions/methds are considered as documented if they are mentioned inside a <function> tag or an id like /baseid + "." + classname + "." + functionname/ exists.

  • Return: Array with doc coverage information
  • Access: public

Parameters:

string   $strPackage   —  Package name
string   $strCategory   —  Category (lowercase)
string   $strBaseId   —  Base documentation id attribute
string   $strPackageDir   —  Package directory

[ Top ]

getPackageDocId   [line 356]

string getPackageDocId( string $strPackage, string $strCategory)

Returns the ID of the XML node of the package in the pear documentation.
  • Return: The id, or NULL if not found -> not documented.
  • Access: public

Parameters:

string   $strPackage   —  Package name
string   $strCategory   —  Category name, gotten from self::getCategory()

[ Top ]

getPackageList   [line 288]

array getPackageList( string $strPearDir)

Returns a list of packages and their paths
  • Return: Array with package dir as key and package name as value
  • Access: public

Parameters:

string   $strPearDir   —  PEAR CVS directory

[ Top ]

loadXmlDocument   [line 259]

boolean loadXmlDocument( string $strManualPath)

Loads the given xml file into a DOM document.
  • Return: true if all is ok.
  • Access: protected

Parameters:

string   $strManualPath   —  Full path to the manual.xml file of the pear documentation.

[ Top ]

renderCoverage   [line 233]

string renderCoverage( array $arCoverage, [string $strRenderer = 'QA_Peardoc_Coverage_Renderer_SimplePackageList'], [array $arOptions = null])

Renders the coverage analysis into a viewable format.
  • Return: Viewable coverage analysis.
  • Access: public

Parameters:

array   $arCoverage   —  Coverage analysis array from generateCoverage()
string   $strRenderer   —  Classname of the renderer
array   $arOptions   —  Array of options if needed

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:10:40 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.