Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
4ff9af6d
Commit
4ff9af6d
authored
Sep 02, 2007
by
meus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed aditional ?> from lib
parent
d08f4926
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
Doctrine.php
lib/Doctrine.php
+0
-1
Lib.php
lib/Doctrine/Lib.php
+15
-15
No files found.
lib/Doctrine.php
View file @
4ff9af6d
...
@@ -546,4 +546,3 @@ final class Doctrine
...
@@ -546,4 +546,3 @@ final class Doctrine
return
true
;
return
true
;
}
}
}
}
?>
lib/Doctrine/Lib.php
View file @
4ff9af6d
...
@@ -86,16 +86,16 @@ class Doctrine_Lib
...
@@ -86,16 +86,16 @@ class Doctrine_Lib
public
static
function
getCollectionAsXml
(
Doctrine_Collection
$collection
,
SimpleXMLElement
$incomming_xml
=
null
){
public
static
function
getCollectionAsXml
(
Doctrine_Collection
$collection
,
SimpleXMLElement
$incomming_xml
=
null
){
$collectionName
=
Doctrine_Lib
::
plurelize
(
$collection
->
getTable
()
->
tableName
);
$collectionName
=
Doctrine_Lib
::
plurelize
(
$collection
->
getTable
()
->
tableName
);
if
(
$collection
->
count
!=
0
)
{
if
(
$collection
->
count
!=
0
)
{
$record
=
$collection
[
0
];
$record
=
$collection
[
0
];
$xml_options
=
$record
->
option
(
"xml"
);
$xml_options
=
$record
->
option
(
"xml"
);
if
(
isset
(
$xml_options
[
"collection_name"
]))
{
if
(
isset
(
$xml_options
[
"collection_name"
]))
{
$collectionName
=
$xml_options
[
"collection_name"
];
$collectionName
=
$xml_options
[
"collection_name"
];
}
}
}
}
if
(
!
isset
(
$incomming_xml
))
{
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
);
$xml
=
new
SimpleXMLElement
(
$new_xml_string
);
}
else
{
}
else
{
$xml
=
$incomming_xml
->
addChild
(
$collectionName
);
$xml
=
$incomming_xml
->
addChild
(
$collectionName
);
...
@@ -129,18 +129,18 @@ class Doctrine_Lib
...
@@ -129,18 +129,18 @@ class Doctrine_Lib
{
{
$recordname
=
$record
->
getTable
()
->
tableName
;
$recordname
=
$record
->
getTable
()
->
tableName
;
if
(
!
isset
(
$incomming_xml
))
{
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
);
$xml
=
new
SimpleXMLElement
(
$new_xml_string
);
}
else
{
}
else
{
$xml
=
$incomming_xml
->
addChild
(
$recordname
);
$xml
=
$incomming_xml
->
addChild
(
$recordname
);
}
}
foreach
(
$record
->
obtainIdentifier
()
as
$pk_field
=>
$pk_value
){
foreach
(
$record
->
obtainIdentifier
()
as
$pk_field
=>
$pk_value
){
$xml
->
addChild
(
$pk_field
,
$pk_value
);
$xml
->
addChild
(
$pk_field
,
$pk_value
);
}
}
$xml_options
=
$record
->
option
(
"xml"
);
$xml_options
=
$record
->
option
(
"xml"
);
if
(
isset
(
$xml_options
[
"record_name"
]))
{
if
(
isset
(
$xml_options
[
"record_name"
]))
{
$recordname
=
$xml_options
[
"record_name"
];
$recordname
=
$xml_options
[
"record_name"
];
}
}
foreach
(
$record
->
getData
()
as
$field
=>
$value
)
{
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
((
isset
(
$xml_options
[
"ignore_fields"
])
&&
!
in_array
(
$field
,
$xml_options
[
"ignore_fields"
]))
||
!
isset
(
$xml_options
[
"ignore_fields"
]))
{
if
(
$value
instanceOf
Doctrine_Null
)
{
if
(
$value
instanceOf
Doctrine_Null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment