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

Class: QA_Peardoc_Coverage

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

Class Overview


Simple peardoc coverage analysis.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
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

TODO:

  • differentiate between stable and unstable packages (read package.xml)



[ Top ]


Class Variables

$arCategoryAssociation = array(
        'benchmark'                 => 'benchmarking',
        'calendar'                  => 'datetime',
        'games_chess'               => 'structures',
        'genealogy_gedcom'          => 'fileformats',
        'fsm'                       => 'processing',
        'i18nv2'                    => 'internationalization',
        'inline_c'                  => 'php',
        'message'                   => 'encryption',
        'mime_type'                 => 'tools',
        'ole'                       => 'structures',
        'pager'                     => 'html',
        'pager_sliding'             => 'html',
        'pecl_gen'                  => 'php',
        'phpdoc'                    => 'tools',
        'phpdocumentor'             => 'tools',
        '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 62]

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 98]

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',
        'perm_liveuser'
    )

[line 128]

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

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 141]

QA_Peardoc_Coverage __construct( string $strManualPath, $strPearDir)

Creates a new coverage checker instance.
  • Access: public

Parameters:

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

[ Top ]

existsId   [line 373]

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 154]

array generateCoverage( )

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

[ Top ]

getCategory   [line 299]

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 400]

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 338]

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 272]

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 243]

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 220]

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

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:48:03 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.