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
d72c9a23
Commit
d72c9a23
authored
Jun 14, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #345
parent
41e2eadd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
46 deletions
+6
-46
Connection.php
lib/Doctrine/Connection.php
+1
-46
EventListener.php
lib/Doctrine/EventListener.php
+5
-0
No files found.
lib/Doctrine/Connection.php
View file @
d72c9a23
...
...
@@ -37,7 +37,7 @@ Doctrine::autoload('Doctrine_Configurable');
* (for example when query() is being called)
*
* 3. Convenience methods
* Doctrine_Connection provides many convenience methods.
* Doctrine_Connection provides many convenience methods
such as fetchAll(), fetchOne() etc
.
*
* 4. Modular structure
* Higher level functionality such as schema importing, exporting, sequence handling etc.
...
...
@@ -903,51 +903,6 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
$this
->
tables
[
$name
]
=
$table
;
if
(
$allowExport
)
{
// the following is an algorithm for loading all
// the related tables for all loaded tables
$next
=
count
(
$this
->
tables
);
$prev
=
count
(
$this
->
exported
);
$stack
=
$this
->
exported
;
while
(
$prev
<
$next
)
{
$prev
=
count
(
$this
->
tables
);
foreach
(
$this
->
tables
as
$name
=>
$tableObject
)
{
if
(
isset
(
$stack
[
$name
]))
{
continue
;
}
else
{
$stack
[
$name
]
=
true
;
}
$tableObject
->
getRelations
();
}
$next
=
count
(
$this
->
tables
);
}
// when all the tables are loaded we build the array in which the order of the tables is
// relationally correct so that then those can be created in the given order)
$names
=
array_keys
(
$this
->
tables
);
$names
=
$this
->
unitOfWork
->
buildFlushTree
(
$names
);
foreach
(
$names
as
$name
)
{
$tableObject
=
$this
->
tables
[
$name
];
if
(
isset
(
$this
->
exported
[
$name
]))
{
continue
;
}
if
(
$tableObject
->
getAttribute
(
Doctrine
::
ATTR_EXPORT
)
&
Doctrine
::
EXPORT_TABLES
)
{
$tableObject
->
export
();
}
$this
->
exported
[
$name
]
=
true
;
}
}
return
$table
;
}
...
...
lib/Doctrine/EventListener.php
View file @
d72c9a23
...
...
@@ -93,6 +93,11 @@ class Doctrine_EventListener implements Doctrine_EventListener_Interface
public
function
onOpen
(
Doctrine_Connection
$connection
)
{
}
public
function
onConnect
(
Doctrine_Connection
$connection
)
{
}
public
function
onPreConnect
(
Doctrine_Connection
$connection
)
{
}
public
function
onTransactionCommit
(
Doctrine_Connection
$connection
)
{
}
public
function
onPreTransactionCommit
(
Doctrine_Connection
$connection
)
...
...
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