public function processEntry(Entry $entry)
    {
        $data = $entry->getData();

        $xEntry = new XMLElement('entry');
        $xEntry->setAttribute('id', $entry->get('id'));

        if (!empty($this->_associated_sections)) {
            $this->setAssociatedEntryCounts($xEntry, $entry);
        }

        if ($this->_can_process_system_parameters) {
            $this->processSystemParameters($entry);
        }

        foreach ($data as $field_id => $values) {
            if (!isset(self::$_fieldPool[$field_id]) || !is_object(self::$_fieldPool[$field_id])) {
                self::$_fieldPool[$field_id] = FieldManager::fetch($field_id);
            }

            $this->processOutputParameters($entry, $field_id, $values);

            if (!$this->_param_output_only) {
                foreach ($this->dsParamINCLUDEDELEMENTS as $handle) {
                    list($handle, $mode) = preg_split('/\s*:\s*/', $handle, 2);

                    if (self::$_fieldPool[$field_id]->get('element_name') == $handle) {
                        self::$_fieldPool[$field_id]->appendFormattedElement($xEntry, $values, ($this->dsParamHTMLENCODE === 'yes' ? true : false), $mode, $entry->get('id'));
                    }
                }
            }
        }

        if ($this->_param_output_only) {
            return true;
        }

        // This is deprecated and will be removed in Symphony 3.0.0
        if (in_array('system:date', $this->dsParamINCLUDEDELEMENTS)) {
            if (Symphony::Log()) {
                Symphony::Log()->pushDeprecateWarningToLog('system:date', 'system:creation-date` or `system:modification-date', array(
                    'message-format' => __('The `%s` data source field is deprecated.')
                ));
            }
            $xDate = new XMLElement('system-date');
            $xDate->appendChild(
                General::createXMLDateObject(
                    DateTimeObj::get('U', $entry->get('creation_date')),
                    'created'
                )
            );
            $xDate->appendChild(
                General::createXMLDateObject(
                    DateTimeObj::get('U', $entry->get('modification_date')),
                    'modified'
                )
            );
            $xEntry->appendChild($xDate);
        }

        return $xEntry;
    }
public function processEntry(Entry $entry)
    {
        $data = $entry->getData();

        $xEntry = new XMLElement('entry');
        $xEntry->setAttribute('id', $entry->get('id'));

        if (!empty($this->_associated_sections)) {
            $this->setAssociatedEntryCounts($xEntry, $entry);
        }

        if ($this->_can_process_system_parameters) {
            $this->processSystemParameters($entry);
        }

        foreach ($data as $field_id => $values) {
            if (!isset(self::$_fieldPool[$field_id]) || !is_object(self::$_fieldPool[$field_id])) {
                self::$_fieldPool[$field_id] = FieldManager::fetch($field_id);
            }

            $this->processOutputParameters($entry, $field_id, $values);

            if (!$this->_param_output_only) {
                foreach ($this->dsParamINCLUDEDELEMENTS as $handle) {
                    list($handle, $mode) = preg_split('/\s*:\s*/', $handle, 2);

                    if (self::$_fieldPool[$field_id]->get('element_name') == $handle) {
                        self::$_fieldPool[$field_id]->appendFormattedElement($xEntry, $values, ($this->dsParamHTMLENCODE === 'yes' ? true : false), $mode, $entry->get('id'));
                    }
                }
            }
        }

        if ($this->_param_output_only) {
            return true;
        }

        // This is deprecated and will be removed in Symphony 3.0.0
        if (in_array('system:date', $this->dsParamINCLUDEDELEMENTS)) {
            if (Symphony::Log()) {
                Symphony::Log()->pushDeprecateWarningToLog('system:date', 'system:creation-date` or `system:modification-date', array(
                    'message-format' => __('The `%s` data source field is deprecated.')
                ));
            }
            $xDate = new XMLElement('system-date');
            $xDate->appendChild(
                General::createXMLDateObject(
                    DateTimeObj::get('U', $entry->get('creation_date')),
                    'created'
                )
            );
            $xDate->appendChild(
                General::createXMLDateObject(
                    DateTimeObj::get('U', $entry->get('modification_date')),
                    'modified'
                )
            );
            $xEntry->appendChild($xDate);
        }

        return $xEntry;
    }
public function processEntry ( Entry $ entry ) { $ data = $ entry -> getData ( ) ; $ xEntry = new XMLElement ( 'entry' ) ; $ xEntry -> setAttribute ( 'id' , $ entry -> get ( 'id' ) ) ; if ( ! empty ( $ this -> _associated_sections ) ) { $ this -> setAssociatedEntryCounts ( $ xEntry , $ entry ) ; } if ( $ this -> _can_process_system_parameters ) { $ this -> processSystemParameters ( $ entry ) ; } foreach ( $ data as $ field_id => $ values ) { if ( ! isset ( self :: $ _fieldPool [ $ field_id ] ) || ! is_object ( self :: $ _fieldPool [ $ field_id ] ) ) { self :: $ _fieldPool [ $ field_id ] = FieldManager :: fetch ( $ field_id ) ; } $ this -> processOutputParameters ( $ entry , $ field_id , $ values ) ; if ( ! $ this -> _param_output_only ) { foreach ( $ this -> dsParamINCLUDEDELEMENTS as $ handle ) { list ( $ handle , $ mode ) = preg_split ( '/\s*:\s*/' , $ handle , 2 ) ; if ( self :: $ _fieldPool [ $ field_id ] -> get ( 'element_name' ) == $ handle ) { self :: $ _fieldPool [ $ field_id ] -> appendFormattedElement ( $ xEntry , $ values , ( $ this -> dsParamHTMLENCODE === 'yes' ? true : false ) , $ mode , $ entry -> get ( 'id' ) ) ; } } } } if ( $ this -> _param_output_only ) { return true ; } // This is deprecated and will be removed in Symphony 3.0.0 if ( in_array ( 'system:date' , $ this -> dsParamINCLUDEDELEMENTS ) ) { if ( Symphony :: Log ( ) ) { Symphony :: Log ( ) -> pushDeprecateWarningToLog ( 'system:date' , 'system:creation-date` or `system:modification-date' , array ( 'message-format' => __ ( 'The `%s` data source field is deprecated.' ) ) ) ; } $ xDate = new XMLElement ( 'system-date' ) ; $ xDate -> appendChild ( General :: createXMLDateObject ( DateTimeObj :: get ( 'U' , $ entry -> get ( 'creation_date' ) ) , 'created' ) ) ; $ xDate -> appendChild ( General :: createXMLDateObject ( DateTimeObj :: get ( 'U' , $ entry -> get ( 'modification_date' ) ) , 'modified' ) ) ; $ xEntry -> appendChild ( $ xDate ) ; } return $ xEntry ; }
Given an Entry object, this function will generate an XML representation
of the Entry to be returned. It will also add any parameters selected
by this datasource to the parameter pool.

@param Entry $entry
@throws Exception
@return XMLElement|boolean
Returns boolean when only parameters are to be returned.
Given an Entry object this function will generate an XML representation of the Entry to be returned . It will also add any parameters selected by this datasource to the parameter pool .