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
c134ad16
Commit
c134ad16
authored
Nov 21, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for new attributes
parent
a27ed3d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
Configurable.php
lib/Doctrine/Configurable.php
+18
-0
Manager.php
lib/Doctrine/Manager.php
+7
-0
No files found.
lib/Doctrine/Configurable.php
View file @
c134ad16
...
@@ -116,7 +116,25 @@ abstract class Doctrine_Configurable {
...
@@ -116,7 +116,25 @@ abstract class Doctrine_Configurable {
case
Doctrine
::
ATTR_AUTO_LENGTH_VLD
:
case
Doctrine
::
ATTR_AUTO_LENGTH_VLD
:
case
Doctrine
::
ATTR_AUTO_TYPE_VLD
:
case
Doctrine
::
ATTR_AUTO_TYPE_VLD
:
case
Doctrine
::
ATTR_QUERY_LIMIT
:
case
Doctrine
::
ATTR_QUERY_LIMIT
:
case
Doctrine
::
ATTR_QUOTE_IDENTIFIER
:
case
Doctrine
::
ATTR_PORTABILITY
:
break
;
case
Doctrine
::
ATTR_SEQCOL_NAME
:
if
(
!
is_string
(
$value
))
throw
new
Doctrine_Exception
(
'Sequence column name attribute only accepts string values'
);
break
;
case
Doctrine
::
ATTR_FIELD_CASE
:
if
(
$value
!=
0
&&
$value
!=
CASE_LOWER
&&
$value
!=
CASE_UPPER
)
throw
new
Doctrine_Exception
(
'Field case attribute should be either 0, CASE_LOWER or CASE_UPPER constant.'
);
break
;
case
Doctrine
::
ATTR_SEQNAME_FORMAT
:
case
Doctrine
::
ATTR_IDXNAME_FORMAT
:
if
(
$this
instanceof
Doctrine_Table
)
{
throw
new
Doctrine_Exception
(
'Sequence / index name format attributes cannot be set'
.
'at table level (only at connection or global level).'
);
}
break
;
break
;
default
:
default
:
throw
new
Doctrine_Exception
(
"Unknown attribute."
);
throw
new
Doctrine_Exception
(
"Unknown attribute."
);
...
...
lib/Doctrine/Manager.php
View file @
c134ad16
...
@@ -97,6 +97,11 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
...
@@ -97,6 +97,11 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
Doctrine
::
ATTR_AUTO_TYPE_VLD
=>
true
,
Doctrine
::
ATTR_AUTO_TYPE_VLD
=>
true
,
Doctrine
::
ATTR_CREATE_TABLES
=>
true
,
Doctrine
::
ATTR_CREATE_TABLES
=>
true
,
Doctrine
::
ATTR_QUERY_LIMIT
=>
Doctrine
::
LIMIT_RECORDS
,
Doctrine
::
ATTR_QUERY_LIMIT
=>
Doctrine
::
LIMIT_RECORDS
,
Doctrine
::
ATTR_IDXNAME_FORMAT
=>
'%_idx'
,
Doctrine
::
ATTR_SEQNAME_FORMAT
=>
'%_seq'
,
Doctrine
::
ATTR_QUOTE_IDENTIFIER
=>
false
,
Doctrine
::
ATTR_SEQCOL_NAME
=>
'id'
,
Doctrine
::
ATTR_PORTABILITY
=>
Doctrine
::
PORTABILITY_ALL
,
);
);
foreach
(
$attributes
as
$attribute
=>
$value
)
{
foreach
(
$attributes
as
$attribute
=>
$value
)
{
$old
=
$this
->
getAttribute
(
$attribute
);
$old
=
$this
->
getAttribute
(
$attribute
);
...
@@ -186,6 +191,8 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
...
@@ -186,6 +191,8 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
case
"informix"
:
case
"informix"
:
$this
->
connections
[
$name
]
=
new
Doctrine_Connection_Informix
(
$this
,
$adapter
);
$this
->
connections
[
$name
]
=
new
Doctrine_Connection_Informix
(
$this
,
$adapter
);
break
;
break
;
default
:
throw
new
Doctrine_Manager_Exception
(
'Unknown connection driver '
.
$adapter
->
getAttribute
(
PDO
::
ATTR_DRIVER_NAME
));
endswitch
;
endswitch
;
...
...
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