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
5de6c0a6
Commit
5de6c0a6
authored
Oct 01, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified object population mechanism
parent
ca213ac6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
79 deletions
+49
-79
Hydrate.php
lib/Doctrine/Hydrate.php
+49
-79
No files found.
lib/Doctrine/Hydrate.php
View file @
5de6c0a6
...
...
@@ -273,37 +273,8 @@ abstract class Doctrine_Hydrate extends Doctrine_Access {
if
(
$this
->
aggregate
)
return
$stmt
->
fetchAll
(
PDO
::
FETCH_ASSOC
);
switch
(
count
(
$this
->
tables
))
:
case
0
:
if
(
count
(
$this
->
tables
)
==
0
)
throw
new
Doctrine_Exception
(
"No tables selected"
);
break
;
case
1
:
$keys
=
array_keys
(
$this
->
tables
);
$name
=
$this
->
tables
[
$keys
[
0
]]
->
getComponentName
();
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
:
foreach
(
$data
as
$key
=>
$value
)
:
$e
=
explode
(
"__"
,
$key
);
if
(
count
(
$e
)
>
1
)
{
$data
[
end
(
$e
)]
=
$value
;
}
else
{
$data
[
$e
[
0
]]
=
$value
;
}
unset
(
$data
[
$key
]);
endforeach
;
$this
->
data
[
$name
][]
=
$data
;
endwhile
;
return
$this
->
getCollection
(
$keys
[
0
]);
break
;
default
:
$keys
=
array_keys
(
$this
->
tables
);
$root
=
$keys
[
0
];
...
...
@@ -378,7 +349,6 @@ abstract class Doctrine_Hydrate extends Doctrine_Access {
}
return
$coll
;
endswitch
;
}
/**
* initRelation
...
...
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