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
89fa42e8
Commit
89fa42e8
authored
Feb 10, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added index()
parent
31624bce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
Record.php
lib/Doctrine/Record.php
+23
-13
No files found.
lib/Doctrine/Record.php
View file @
89fa42e8
...
...
@@ -1414,14 +1414,6 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
{
$this
->
_table
->
bind
(
$componentName
,
$foreignKey
,
Doctrine_Relation
::
MANY_AGGREGATE
,
$localKey
);
}
/**
* setPrimaryKey
* @param mixed $key
*/
final
public
function
setPrimaryKey
(
$key
)
{
$this
->
_table
->
setPrimaryKey
(
$key
);
}
/**
* hasColumn
* sets a column definition
...
...
@@ -1515,8 +1507,8 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
* sets or retrieves an option
*
* @see Doctrine_Table::$options availible options
* @param mixed $name
* @param mixed $value
* @param mixed $name
the name of the option
* @param mixed $value
options value
* @return mixed
*/
public
function
option
(
$name
,
$value
=
null
)
...
...
@@ -1533,9 +1525,24 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
$this
->
_table
->
setOption
(
$name
,
$value
);
}
}
public
function
hasIndex
(
$name
)
/**
* index
* defines or retrieves an index
* if the second parameter is set this method defines an index
* if not this method retrieves index named $name
*
* @param string $name the name of the index
* @param array|string $columns an array of columns or a single column name
* @param array $options an array of options
* @return mixed
*/
public
function
index
(
$name
,
$columns
=
null
,
array
$options
=
array
())
{
if
(
!
$columns
)
{
return
$this
->
_table
->
getIndex
(
$name
);
}
else
{
return
$this
->
_table
->
addIndex
(
$name
,
$columns
,
$options
);
}
}
/**
* addListener
...
...
@@ -1601,7 +1608,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
return
false
;
if
(
!
isset
(
$this
->
_node
))
$this
->
_node
=
Doctrine_Node
::
factory
(
$this
,
$this
->
getTable
()
->
getOption
(
'treeImpl'
),
$this
->
getTable
()
->
getOption
(
'treeOptions'
));
$this
->
_node
=
Doctrine_Node
::
factory
(
$this
,
$this
->
getTable
()
->
getOption
(
'treeImpl'
),
$this
->
getTable
()
->
getOption
(
'treeOptions'
)
);
return
$this
->
_node
;
}
...
...
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