RefXML
+ Inheritance diagram for RefXML:

Description

Reflects to XML.

Protected Properties

array $classes = []
 Only output root entities matching these names or namespaces. More...
 
string[] $exclude = []
 Excludes source files matching these strings. More...
 
array $sources = ['src']
 Source files and directories for inclusion. More...
 

Public Methods

string __toString ()
 
void generate ()
 
string[] getClasses ()
 
string[] getExclude ()
 
string[] getInterfaces ()
 
string[] getSources ()
 
string[] getTraits ()
 
$this setClasses (?string $List)
 
$this setExclude (?string $excludePatternList)
 
$this setSources (?string $sourceList)
 
bool void startElement ($name, array $attrs=[])
 
DOMDocument toDOMDocument ()
 
void writeAttributes (array $attrs)
 Writes multiple attributes, ignores empty strings. More...
 
bool writeElement ($name, $content=null, array $attrs=[], $cdata=false)
 Can write an element with an array of attributes. More...
 
 writeList (string $listName, ?string $itemName, array $items, array $listAttrs=[], bool $cdata=false)
 Writes repeating elements. More...
 

Protected Methods

void _includeAll (array $paths)
 
void _includeFile (string $file)
 
bool filterNamespace (string $name)
 

Properties

◆ $classes

array $classes = []
protected

Only output root entities matching these names or namespaces.

Default: all namespaces

◆ $exclude

string [] $exclude = []
protected

Excludes source files matching these strings.

◆ $sources

array $sources = ['src']
protected

Source files and directories for inclusion.

Methods

◆ __toString()

string __toString ( )
Returns
string

◆ filterNamespace()

bool filterNamespace ( string  $name)
protected
Parameters
string$name
Returns
bool

◆ getClasses()

string [] getClasses ( )
Returns
string[]

◆ getExclude()

string [] getExclude ( )
Returns
string[]

◆ getInterfaces()

string [] getInterfaces ( )
Returns
string[]

◆ getSources()

string [] getSources ( )
Returns
string[]

◆ getTraits()

string [] getTraits ( )
Returns
string[]

◆ setClasses()

$this setClasses ( ?string  $List)
Parameters
null | string$List
Returns
$this

◆ setExclude()

$this setExclude ( ?string  $excludePatternList)
Parameters
null | string$excludePatternList
Returns
$this

◆ setSources()

$this setSources ( ?string  $sourceList)
Parameters
null | string$sourceList
Returns
$this

◆ startElement()

bool void startElement (   $name,
array  $attrs = [] 
)
Parameters
string$name
string[]$attrs
Returns
bool|void

◆ toDOMDocument()

DOMDocument toDOMDocument ( )
Returns
DOMDocument

◆ writeAttributes()

void writeAttributes ( array  $attrs)

Writes multiple attributes, ignores empty strings.

Parameters
string[]$attrs

◆ writeElement()

bool writeElement (   $name,
  $content = null,
array  $attrs = [],
  $cdata = false 
)

Can write an element with an array of attributes.

Will not write empty elements. Use attributes for that.

Parameters
string$name
string | XMLWriterInterface$content
string[]$attrs
bool$cdata
Returns
bool

◆ writeList()

writeList ( string  $listName,
?string  $itemName,
array  $items,
array  $listAttrs = [],
bool  $cdata = false 
)

Writes repeating elements.

Parameters
string$listNameList container element name.
null | string$itemNameRepeated list item name. This is ignored when $items can write themselves.
string[] | XMLWriterInterface[]$itemsList item contents.
string[]$listAttrsAttributes for $listName
bool$cdataWhether list items are CData.