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
24528cb8
Commit
24528cb8
authored
Jul 21, 2006
by
doctrine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
17b452b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
51 deletions
+0
-51
IdentityMap.class.php
Doctrine/IdentityMap.class.php
+0
-51
No files found.
Doctrine/IdentityMap.class.php
deleted
100644 → 0
View file @
17b452b2
<?php
abstract
class
Doctrine_Creator
{
protected
$_table
;
/**
* constructor
*
* @param Doctrine_Table $table
*/
public
function
__construct
(
Doctrine_Table
$table
)
{
$this
->
_table
=
$_table
;
}
abstract
public
function
get
();
}
class
Doctrine_IdentityMap
{
private
$identityMap
=
array
();
/**
* first checks if record exists in identityMap, if not
* returns a new record
*
* @return Doctrine_Record
*/
public
function
get
()
{
$key
=
$this
->
getIdentifier
();
if
(
!
is_array
(
$key
))
$key
=
array
(
$key
);
foreach
(
$key
as
$k
)
{
if
(
!
isset
(
$this
->
data
[
$k
]))
throw
new
Doctrine_Exception
(
"No primary key found"
);
$id
[]
=
$this
->
data
[
$k
];
}
$id
=
implode
(
' '
,
$id
);
if
(
isset
(
$this
->
identityMap
[
$id
]))
$record
=
$this
->
identityMap
[
$id
];
else
{
$record
=
new
$this
->
name
(
$this
);
$this
->
identityMap
[
$id
]
=
$record
;
}
$this
->
data
=
array
();
return
$record
;
}
}
?>
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