for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace StringObject\Decorator;
use StringObject\StrObj;
class Tokens implements \Iterator
{
private $strobj;
private $delim;
private $index = 0;
private $curval;
public function __construct(StrObj $strobj, $delim)
$this->strobj = $strobj;
$this->delim = $delim;
}
public function changeToken($delim)
public function current()
return $this->curval;
public function key()
return $this->index;
public function next()
$this->curval = $this->strobj->nextToken($this->delim);
$this->index++;
public function rewind()
$this->strobj->resetToken();
$this->index = 0;
public function valid()
return ($this->curval !== false);