src/OaiPmh/RecordXmlFormatter.php
protected function getHeaderAdditions($header)
    {
        $insert = '';
        if ($this->injectDate) {
            $insert .= $this
                ->createTag($this->injectDate, (string)$header->datestamp);
        }
        if (isset($header->setSpec)
            && ($this->injectSetSpec || $this->injectSetName)
        ) {
            $insert .= $this->getHeaderSetAdditions($header->setSpec);
        }
        if ($this->injectHeaderElements) {
            foreach ($this->injectHeaderElements as $element) {
                if (isset($header->$element)) {
                    $insert .= $header->$element->asXML();
                }
            }
        }
        return $insert;
    }
protected function getHeaderAdditions($header)
    {
        $insert = '';
        if ($this->injectDate) {
            $insert .= $this
                ->createTag($this->injectDate, (string)$header->datestamp);
        }
        if (isset($header->setSpec)
            && ($this->injectSetSpec || $this->injectSetName)
        ) {
            $insert .= $this->getHeaderSetAdditions($header->setSpec);
        }
        if ($this->injectHeaderElements) {
            foreach ($this->injectHeaderElements as $element) {
                if (isset($header->$element)) {
                    $insert .= $header->$element->asXML();
                }
            }
        }
        return $insert;
    }
protected function getHeaderAdditions ( $ header ) { $ insert = '' ; if ( $ this -> injectDate ) { $ insert .= $ this -> createTag ( $ this -> injectDate , ( string ) $ header -> datestamp ) ; } if ( isset ( $ header -> setSpec ) && ( $ this -> injectSetSpec || $ this -> injectSetName ) ) { $ insert .= $ this -> getHeaderSetAdditions ( $ header -> setSpec ) ; } if ( $ this -> injectHeaderElements ) { foreach ( $ this -> injectHeaderElements as $ element ) { if ( isset ( $ header -> $ element ) ) { $ insert .= $ header -> $ element -> asXML ( ) ; } } } return $ insert ; }
Format header elements as XML tags for inclusion in final record.

@param object $header Header element (in SimpleXML format).

@return string
Format header elements as XML tags for inclusion in final record .