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
581f1215
Commit
581f1215
authored
Apr 19, 2006
by
doctrine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed component batch iterator
parent
16497adb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
74 deletions
+0
-74
BatchIterator.class.php
classes/BatchIterator.class.php
+0
-74
No files found.
classes/BatchIterator.class.php
deleted
100644 → 0
View file @
16497adb
<?php
/**
* Doctrine_BatchIterator
* iterates through Doctrine_Collection_Batch
*/
class
Doctrine_BatchIterator
implements
Iterator
{
/**
* @var Doctrine_Collection_Batch $collection
*/
private
$collection
;
/**
* @var array $keys
*/
private
$keys
;
/**
* @var mixed $key
*/
private
$key
;
/**
* @var integer $index
*/
private
$index
;
/**
* @var integer $count
*/
private
$count
;
/**
* constructor
* @var Doctrine_Collection_Batch $collection
*/
public
function
__construct
(
Doctrine_Collection_Batch
$collection
)
{
$this
->
collection
=
$collection
;
$this
->
keys
=
$this
->
collection
->
getKeys
();
$this
->
count
=
$this
->
collection
->
count
();
}
/**
* @return void
*/
public
function
rewind
()
{
$this
->
index
=
0
;
$i
=
$this
->
index
;
if
(
isset
(
$this
->
keys
[
$i
]))
$this
->
key
=
$this
->
keys
[
$i
];
}
/**
* @return boolean whether or not the iteration will continue
*/
public
function
valid
()
{
return
$this
->
index
<
$this
->
count
;
}
/**
* @return integer the current key
*/
public
function
key
()
{
return
$this
->
key
;
}
/**
* @return Doctrine_Record the current DAO
*/
public
function
current
()
{
return
$this
->
collection
->
get
(
$this
->
key
);
}
/**
* @return void
*/
public
function
next
()
{
$this
->
index
++
;
$i
=
$this
->
index
;
if
(
isset
(
$this
->
keys
[
$i
]))
$this
->
key
=
$this
->
keys
[
$i
];
}
}
?>
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