Skip to content

Commit

Permalink
Added two functions for new cached scripts layout
Browse files Browse the repository at this point in the history
get and set position for highlighting files within directory
  • Loading branch information
k9krew committed Mar 28, 2014
1 parent 9179eff commit 10101e1
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/OpCacheGUI/Presentation/ClassCycler.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(array $classes)
*/
public function next()
{
if ($this->position === count($this->classes)) {
if ($this->position >= count($this->classes)) {
$this->rewind();
}

Expand All @@ -63,4 +63,21 @@ public function rewind()
{
$this->position = 0;
}

/**
* Return the current position
*/
public function get_position()
{
return $this->position;
}

/**
* Set the current position
*/
public function set_position($pos)
{
$this->position = $pos;
}

}

0 comments on commit 10101e1

Please sign in to comment.