Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/cch/www/pear/PHPDoc/xmlexporter/PhpdocXMLExporter.php
PEAR Repository - PHPDoc

PhpdocXMLExporter

PhpdocObject
   |
  +-- PhpdocXMLExporter

Exporter used to export phpdoc internals data structures as xml documents.

 

private class PhpdocXMLExporter extends PhpdocObject

Exporter used to export phpdoc internals data structures as xml documents.

AuthorsUlf Wendel <ulf.wendel@phpdoc.de>
Version1.0

 
Direct known subclasses: PhpdocXMLDocumentExporter, PhpdocXMLIndexExporter, PhpdocXMLWarningExporter

Methods inherited from PhpdocObject

setflagoutput, out, nametourl, outl, introspection

Public Method Summary

void

PhpdocXMLExporter()

Creates a PhpdocXMLWriter object.
void

setPath( $path)

Sets the target path for the generated xml documents.
void

export(string $result, string $xmlfile)

Exports the given result array as xml document.

Private Method Summary

array

getAttributes(array $data, array $allowed)

Kind of array_intersect for xml attributes.
void

setResult( $result)

Fields inherited from PhpdocObject

$err, $flag_output, $application, $warn

Private Field Summary

string

$fileprefix

Filename prefix for the generated xml document.
string

$path

Target directory where the xml documents get saved.
array

$result

Data to save as a xml document.
unknown

$xmlwriter

Instance of PhpdocXMLWriter used to generate the xml document.

Public Method Details

PhpdocXMLExporter

public void PhpdocXMLExporter( )

  Creates a PhpdocXMLWriter object.

Make sure that all derived classes call this constructor.

Returns void

See Also $xmlwriter

setPath

public void setPath( $path )

  Sets the target path for the generated xml documents.

Parameter
$path
Returns void

See Also $path

export

public void export( string $result, string $xmlfile )

  Exports the given result array as xml document.

Parameter
string $result
name of the target xml file
string $xmlfile
Returns void

See Also create(), $result

Private Method Details

getAttributes

private array getAttributes( array $data, array $allowed )

  Kind of array_intersect for xml attributes.

This functions takes a data array and a list of allowed fields in the data
array. All of the allowed fields that exists in the data array will be
copied to returned array which looks like:
$attribs[name] = array ( type => allowed[name], value => data[name] ).
This structure is used by PhpdocXMLWriter->addElement().

Parameter
array $data
data array
array $allowed
array of allowed fields and their attribute type
Returns array $attribs


setResult

private void setResult( $result )

 

Parameter
$result
Returns void


Private Field Details

$fileprefix

private string $fileprefix

>>""<<


$path

private string $path

>>""<<

See Also setPath()

$result

private array $result

>>array()<<

See Also setResult(), export()

$xmlwriter

private unknown $xmlwriter

>>unknown<<

See Also PhpdocXMLExporter()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta