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
2169cbe9
Commit
2169cbe9
authored
Sep 20, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
bea3d563
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
Table.php
lib/Doctrine/Table.php
+23
-23
No files found.
lib/Doctrine/Table.php
View file @
2169cbe9
...
...
@@ -44,12 +44,12 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
/**
* @var mixed $identifier
*/
private
$identifier
;
private
$
_
identifier
;
/**
* @see Doctrine_Identifier constants
* @var integer $identifierType the type of identifier this table uses
*/
private
$identifierType
;
private
$
_
identifierType
;
/**
* @var Doctrine_Connection $conn Doctrine_Connection object that created this table
*/
...
...
@@ -57,11 +57,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
/**
* @var array $identityMap first level cache
*/
private
$identityMap
=
array
();
private
$
_
identityMap
=
array
();
/**
* @var Doctrine_Table_Repository $repository record repository
*/
private
$repository
;
private
$
_
repository
;
/**
* @var array $columns an array of column definitions,
* keys as column names and values as column definitions
...
...
@@ -233,14 +233,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
'primary'
=>
true
)),
$this
->
columns
);
$this
->
primaryKeys
[]
=
'id'
;
$this
->
identifier
=
'id'
;
$this
->
identifierType
=
Doctrine
::
IDENTIFIER_AUTOINC
;
$this
->
_
identifier
=
'id'
;
$this
->
_
identifierType
=
Doctrine
::
IDENTIFIER_AUTOINC
;
$this
->
columnCount
++
;
break
;
default
:
if
(
count
(
$this
->
primaryKeys
)
>
1
)
{
$this
->
identifier
=
$this
->
primaryKeys
;
$this
->
identifierType
=
Doctrine
::
IDENTIFIER_COMPOSITE
;
$this
->
_
identifier
=
$this
->
primaryKeys
;
$this
->
_
identifierType
=
Doctrine
::
IDENTIFIER_COMPOSITE
;
}
else
{
foreach
(
$this
->
primaryKeys
as
$pk
)
{
...
...
@@ -257,12 +257,12 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
switch
(
strtolower
(
$e2
[
0
]))
{
case
'autoincrement'
:
case
'autoinc'
:
$this
->
identifierType
=
Doctrine
::
IDENTIFIER_AUTOINC
;
$this
->
_
identifierType
=
Doctrine
::
IDENTIFIER_AUTOINC
;
$found
=
true
;
break
;
case
'seq'
:
case
'sequence'
:
$this
->
identifierType
=
Doctrine
::
IDENTIFIER_SEQUENCE
;
$this
->
_
identifierType
=
Doctrine
::
IDENTIFIER_SEQUENCE
;
$found
=
true
;
if
(
$value
)
{
...
...
@@ -277,10 +277,10 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
break
;
}
}
if
(
!
isset
(
$this
->
identifierType
))
{
$this
->
identifierType
=
Doctrine
::
IDENTIFIER_NATURAL
;
if
(
!
isset
(
$this
->
_
identifierType
))
{
$this
->
_
identifierType
=
Doctrine
::
IDENTIFIER_NATURAL
;
}
$this
->
identifier
=
$pk
;
$this
->
_
identifier
=
$pk
;
}
}
}
...
...
@@ -292,7 +292,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
if
(
$this
->
isTree
())
{
$this
->
getTree
()
->
setUp
();
}
$this
->
repository
=
new
Doctrine_Table_Repository
(
$this
);
$this
->
_
repository
=
new
Doctrine_Table_Repository
(
$this
);
}
/**
* getTemplates
...
...
@@ -612,7 +612,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
*/
public
function
getRepository
()
{
return
$this
->
repository
;
return
$this
->
_
repository
;
}
/**
* setOption
...
...
@@ -782,14 +782,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
*/
public
function
getIdentifier
()
{
return
$this
->
identifier
;
return
$this
->
_
identifier
;
}
/**
* @return integer
*/
public
function
getIdentifierType
()
{
return
$this
->
identifierType
;
return
$this
->
_
identifierType
;
}
/**
* hasColumn
...
...
@@ -895,7 +895,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
*/
public
function
clear
()
{
$this
->
identityMap
=
array
();
$this
->
_
identityMap
=
array
();
}
/**
* addRecord
...
...
@@ -908,11 +908,11 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
{
$id
=
implode
(
' '
,
$record
->
identifier
());
if
(
isset
(
$this
->
identityMap
[
$id
]))
{
if
(
isset
(
$this
->
_
identityMap
[
$id
]))
{
return
false
;
}
$this
->
identityMap
[
$id
]
=
$record
;
$this
->
_
identityMap
[
$id
]
=
$record
;
return
true
;
}
...
...
@@ -955,13 +955,13 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
$id
=
implode
(
' '
,
$id
);
if
(
isset
(
$this
->
identityMap
[
$id
]))
{
$record
=
$this
->
identityMap
[
$id
];
if
(
isset
(
$this
->
_
identityMap
[
$id
]))
{
$record
=
$this
->
_
identityMap
[
$id
];
$record
->
hydrate
(
$this
->
data
);
}
else
{
$recordName
=
$this
->
getClassnameToReturn
();
$record
=
new
$recordName
(
$this
);
$this
->
identityMap
[
$id
]
=
$record
;
$this
->
_
identityMap
[
$id
]
=
$record
;
}
$this
->
data
=
array
();
}
else
{
...
...
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