77 $siteAttr = [
'type' => $site->getType() ];
82 fwrite( $this->sink,
"\t" . Xml::openElement(
'site', $siteAttr ) .
"\n" );
84 fwrite( $this->sink,
"\t\t" . Xml::element(
'globalid',
null, $site->getGlobalId() ) .
"\n" );
87 fwrite( $this->sink,
"\t\t" . Xml::element(
'group',
null, $site->getGroup() ) .
"\n" );
91 fwrite( $this->sink,
"\t\t" . Xml::element(
'source',
null, $site->getSource() ) .
"\n" );
94 if ( $site->shouldForward() ) {
95 fwrite( $this->sink,
"\t\t" . Xml::element(
'forward',
null,
'' ) .
"\n" );
98 foreach ( $site->getAllPaths() as
$type => $path ) {
99 fwrite( $this->sink,
"\t\t" . Xml::element(
'path', [
'type' =>
$type ], $path ) .
"\n" );
102 foreach ( $site->getLocalIds() as
$type => $ids ) {
103 foreach ( $ids as $id ) {
104 fwrite( $this->sink,
"\t\t" . Xml::element(
'localid', [
'type' =>
$type ], $id ) .
"\n" );
111 fwrite( $this->sink,
"\t" . Xml::closeElement(
'site' ) .
"\n" );