Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: c:/www/apache/doc2//xmlexporter/PhpdocXMLExporter.php
PHPDOC 2000/12/03 - 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>
Version$Id: $

 
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(string $path)

Sets the target path for the generated xml documents.
void

export(array $result, [ string $xmlfile ])

Exports the given result array as xml document.

Private Method Summary

void

setResult(array $result)

array

getAttributes(array $data, array $allowed)

Kind of array_intersect for xml attributes.

Fields inherited from PhpdocObject

$err, $application, $warn, $flag_output

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.
object PhpdocXMLWriter

$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( string $path )

  Sets the target path for the generated xml documents.

Parameter
string $path
Returns void

See Also $path

export

public void export( array $result, [ string $xmlfile ] )

  Exports the given result array as xml document.

Parameter
array $result
string $xmlfile = >>""<<
of the target xml file
Returns void

See Also $result

Private Method Details

setResult

private void setResult( array $result )

 

Parameter
array $result
Returns void


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 dataarray. All of the allowed fields that exists in the data array will becopied 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
array
array $allowed
of allowed fields and their attribute type
Returns array $attribs


Private Field Details

$fileprefix

private string $fileprefix

>>""<<

Filename prefix for the generated xml document.
This class variable must be overriden by all derived classes.PHPDoc uses the filename prefix to detect the content ofthe file.


$path

private string $path

>>""<<

Target directory where the xml documents get saved.

See Also setPath()

$result

private array $result

>>array()<<

Data to save as a xml document.

See Also setResult(), export()

$xmlwriter

private object PhpdocXMLWriter $xmlwriter

>><<

Instance of PhpdocXMLWriter used to generate the xml document.

See Also PhpdocXMLExporter()


Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta