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
502103d7
Commit
502103d7
authored
May 27, 2007
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements and a small fix.
parent
56007982
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2160 additions
and
2160 deletions
+2160
-2160
Connection.php
lib/Doctrine/Connection.php
+1
-1
Hydrate.php
lib/Doctrine/Hydrate.php
+932
-933
Table.php
lib/Doctrine/Table.php
+1227
-1226
No files found.
lib/Doctrine/Connection.php
View file @
502103d7
...
...
@@ -668,7 +668,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
}
$class
=
$name
.
'Table'
;
if
(
class_exists
(
$class
)
&&
in_array
(
'Doctrine_Table'
,
class_parents
(
$class
)))
{
if
(
class_exists
(
$class
,
false
)
&&
in_array
(
'Doctrine_Table'
,
class_parents
(
$class
)))
{
$table
=
new
$class
(
$name
,
$this
);
}
else
{
$table
=
new
Doctrine_Table
(
$name
,
$this
);
...
...
lib/Doctrine/Hydrate.php
View file @
502103d7
...
...
@@ -902,25 +902,24 @@ class Doctrine_Hydrate implements Serializable
public
function
parseData
(
$stmt
)
{
$array
=
array
();
$cache
=
array
();
while
(
$data
=
$stmt
->
fetch
(
PDO
::
FETCH_ASSOC
))
{
/**
* parse the data into two-dimensional array
*/
foreach
(
$data
as
$key
=>
$value
)
{
if
(
!
isset
(
$cache
[
$key
]))
{
$e
=
explode
(
'__'
,
$key
);
$cache
[
$key
][
'field'
]
=
strtolower
(
array_pop
(
$e
));
$cache
[
$key
][
'component'
]
=
strtolower
(
implode
(
'__'
,
$e
));
}
$field
=
strtolower
(
array_pop
(
$e
));
$tableAlias
=
strtolower
(
implode
(
'__'
,
$e
));
$data
[
$tableAlias
][
$field
]
=
$value
;
$data
[
$cache
[
$key
][
'component'
]][
$cache
[
$key
][
'field'
]]
=
$value
;
unset
(
$data
[
$key
]);
}
}
;
$array
[]
=
$data
;
}
};
$stmt
->
closeCursor
();
unset
(
$cache
);
return
$array
;
}
/**
...
...
lib/Doctrine/Table.php
View file @
502103d7
...
...
@@ -591,6 +591,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
*/
public
function
getColumnName
(
$alias
)
{
$alias
=
strtolower
(
$alias
);
if
(
isset
(
$this
->
columnAliases
[
$alias
]))
{
return
$this
->
columnAliases
[
$alias
];
}
...
...
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