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
437fac4c
Commit
437fac4c
authored
Sep 26, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added getDataDict() for connection class
parent
ecd2612e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
Connection.php
lib/Doctrine/Connection.php
+31
-2
No files found.
lib/Doctrine/Connection.php
View file @
437fac4c
...
@@ -44,6 +44,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
...
@@ -44,6 +44,10 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
* keys representing Doctrine_Table component names and values as Doctrine_Table objects
* keys representing Doctrine_Table component names and values as Doctrine_Table objects
*/
*/
protected
$tables
=
array
();
protected
$tables
=
array
();
/**
* @var Doctrine_DataDict $dataDict
*/
private
$dataDict
;
/**
/**
* the constructor
* the constructor
*
*
...
@@ -105,7 +109,32 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
...
@@ -105,7 +109,32 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
* @return Doctrine_DataDict
* @return Doctrine_DataDict
*/
*/
public
function
getDataDict
()
{
public
function
getDataDict
()
{
if
(
isset
(
$this
->
dataDict
))
return
$this
->
dataDict
;
$driver
=
$this
->
dbh
->
getAttribute
(
PDO
::
ATTR_DRIVER_NAME
);
switch
(
$driver
)
{
case
"mysql"
:
$this
->
dataDict
=
new
Doctrine_DataDict_Mysql
(
$this
);
break
;
case
"sqlite"
:
case
"sqlite2"
:
$this
->
dataDict
=
new
Doctrine_DataDict_Sqlite
(
$this
);
break
;
case
"pgsql"
:
$this
->
dataDict
=
new
Doctrine_DataDict_Pgsql
(
$this
);
break
;
case
"oci"
:
case
"oci8"
:
$this
->
dataDict
=
new
Doctrine_DataDict_Oracle
(
$this
);
break
;
case
"mssql"
:
$this
->
dataDict
=
new
Doctrine_DataDict_Mssql
(
$this
);
break
;
default
:
throw
new
Doctrine_Connection_Exception
(
"No datadict driver availible for "
.
$driver
);
}
return
$this
->
dataDict
;
}
}
/**
/**
* returns the regular expression operator
* returns the regular expression operator
...
...
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