removed aditional ?> from lib
This commit is contained in:
parent
d08f492656
commit
4ff9af6df0
@ -546,4 +546,3 @@ final class Doctrine
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -86,16 +86,16 @@ class Doctrine_Lib
|
||||
public static function getCollectionAsXml(Doctrine_Collection $collection, SimpleXMLElement $incomming_xml = null){
|
||||
|
||||
$collectionName = Doctrine_Lib::plurelize($collection->getTable()->tableName);
|
||||
if ( $collection->count != 0) {
|
||||
$record = $collection[0];
|
||||
$xml_options = $record->option("xml");
|
||||
if ( isset($xml_options["collection_name"])) {
|
||||
$collectionName = $xml_options["collection_name"];
|
||||
}
|
||||
}
|
||||
if ( $collection->count != 0) {
|
||||
$record = $collection[0];
|
||||
$xml_options = $record->option("xml");
|
||||
if ( isset($xml_options["collection_name"])) {
|
||||
$collectionName = $xml_options["collection_name"];
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! isset($incomming_xml)) {
|
||||
$new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $collectionName . "></" . $collectionName . ">";
|
||||
$new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $collectionName . "></" . $collectionName . ">";
|
||||
$xml = new SimpleXMLElement($new_xml_string);
|
||||
} else {
|
||||
$xml = $incomming_xml->addChild($collectionName);
|
||||
@ -129,18 +129,18 @@ class Doctrine_Lib
|
||||
{
|
||||
$recordname = $record->getTable()->tableName;
|
||||
if ( !isset($incomming_xml)) {
|
||||
$new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $recordname . "></" . $recordname . ">";
|
||||
$new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $recordname . "></" . $recordname . ">";
|
||||
$xml = new SimpleXMLElement($new_xml_string);
|
||||
}else{
|
||||
$xml = $incomming_xml->addChild($recordname);
|
||||
}
|
||||
foreach($record->obtainIdentifier() as $pk_field => $pk_value){
|
||||
$xml->addChild($pk_field,$pk_value);
|
||||
}
|
||||
foreach($record->obtainIdentifier() as $pk_field => $pk_value){
|
||||
$xml->addChild($pk_field,$pk_value);
|
||||
}
|
||||
$xml_options = $record->option("xml");
|
||||
if ( isset($xml_options["record_name"])) {
|
||||
$recordname = $xml_options["record_name"];
|
||||
}
|
||||
if ( isset($xml_options["record_name"])) {
|
||||
$recordname = $xml_options["record_name"];
|
||||
}
|
||||
foreach ($record->getData() as $field => $value) {
|
||||
if ((isset($xml_options["ignore_fields"]) && !in_array($field, $xml_options["ignore_fields"])) || !isset($xml_options["ignore_fields"])) {
|
||||
if ($value instanceOf Doctrine_Null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user