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
17f0c82b
Commit
17f0c82b
authored
Sep 20, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored Doctrine_Relation
parent
0244d3dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
Relation.php
Doctrine/Relation.php
+24
-8
No files found.
Doctrine/Relation.php
View file @
17f0c82b
...
...
@@ -85,32 +85,48 @@ class Doctrine_Relation {
$this
->
alias
=
$alias
;
}
/**
* @return string the relation alias
* getAlias
* returns the relation alias
*
* @return string
*/
final
public
function
getAlias
()
{
return
$this
->
alias
;
}
/**
* @return integer the relation type, either 0 or 1
* getType
* returns the relation type, either 0 or 1
*
* @see Doctrine_Relation MANY_* and ONE_* constants
* @return integer
*/
final
public
function
getType
()
{
return
$this
->
type
;
}
/**
* @return object Doctrine_Table foreign factory object
* getTable
* returns the foreign table object
*
* @return object Doctrine_Table
*/
final
public
function
getTable
()
{
return
$this
->
table
;
}
/**
* @return string the name of the local column
* getLocal
* returns the name of the local column
*
* @return string
*/
final
public
function
getLocal
()
{
return
$this
->
local
;
}
/**
* @return string the name of the foreignkey column where
* the localkey column is pointing at
* getForeign
* returns the name of the foreignkey column where
* the localkey column is pointing at
*
* @return string
*/
final
public
function
getForeign
()
{
return
$this
->
foreign
;
...
...
@@ -141,7 +157,7 @@ class Doctrine_Relation {
* We iterate through the old collection and get the records
* that do not exists in the new collection (Doctrine_Records that need to be deleted).
*/
final
public
static
function
getDeleteOperations
(
Doctrine_Collection
$old
,
Doctrine_Collection
$new
)
{
public
static
function
getDeleteOperations
(
Doctrine_Collection
$old
,
Doctrine_Collection
$new
)
{
$r
=
array
();
foreach
(
$old
as
$k
=>
$record
)
{
...
...
@@ -179,7 +195,7 @@ class Doctrine_Relation {
* We iterate through the old collection and get the records
* that exists only in the new collection (Doctrine_Records that need to be added).
*/
final
public
static
function
getInsertOperations
(
Doctrine_Collection
$old
,
Doctrine_Collection
$new
)
{
public
static
function
getInsertOperations
(
Doctrine_Collection
$old
,
Doctrine_Collection
$new
)
{
$r
=
array
();
foreach
(
$new
as
$k
=>
$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