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
ddf0ceab
Commit
ddf0ceab
authored
Sep 27, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doctrine_Collection::internalAdd() removed, fixes #129
Ticket: 129
parent
1a0179bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
34 deletions
+2
-34
Collection.php
lib/Doctrine/Collection.php
+0
-32
Record.php
lib/Doctrine/Record.php
+2
-2
No files found.
lib/Doctrine/Collection.php
View file @
ddf0ceab
...
...
@@ -487,38 +487,6 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
$this
->
data
[
$key
]
=
$record
;
}
/**
* adds a record to collection
* @param Doctrine_Record $record record to be added
* @param string $key optional key for the record
* @return boolean
*/
public
function
internalAdd
(
Doctrine_Record
$record
,
$key
=
null
)
{
if
(
in_array
(
$record
,
$this
->
data
))
return
false
;
if
(
isset
(
$this
->
reference_field
))
$record
->
set
(
$this
->
reference_field
,
$this
->
reference
,
false
);
if
(
isset
(
$key
))
{
if
(
isset
(
$this
->
data
[
$key
]))
return
false
;
$this
->
data
[
$key
]
=
$record
;
return
true
;
}
if
(
isset
(
$this
->
keyColumn
))
{
$value
=
$record
->
get
(
$this
->
keyColumn
);
if
(
$value
===
null
)
throw
new
Doctrine_Collection_Exception
(
"Couldn't create collection index. Record field '"
.
$this
->
keyColumn
.
"' was null."
);
$this
->
data
[
$value
]
=
$record
;
}
else
$this
->
data
[]
=
$record
;
return
true
;
}
/**
* adds a record to collection
* @param Doctrine_Record $record record to be added
...
...
lib/Doctrine/Record.php
View file @
ddf0ceab
...
...
@@ -1188,8 +1188,8 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
public
function
addReference
(
Doctrine_Record
$record
,
Doctrine_Relation
$connector
,
$key
=
null
)
{
$alias
=
$connector
->
getAlias
();
$this
->
references
[
$alias
]
->
internalA
dd
(
$record
,
$key
);
$this
->
originals
[
$alias
]
->
internalA
dd
(
$record
,
$key
);
$this
->
references
[
$alias
]
->
a
dd
(
$record
,
$key
);
$this
->
originals
[
$alias
]
->
a
dd
(
$record
,
$key
);
}
/**
* getReferences
...
...
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