protected function parseBetweenSeparators()
{
$separators = $this->separators;
$result = array();
$varname = $this->getVarname($separators[0]);
$subCodeHandler = new SubCodeHandler($this, $this->input, $this->name);
$getMiddleString = $subCodeHandler->getMiddleString();
$getNext = $subCodeHandler->getNext($separators);
// using next() ourselves so that we can advance the array pointer inside inner loops
while (($sep = current($separators)) && $sep[0] !== null) {
// $sep[0] - the separator string due to PREG_SPLIT_OFFSET_CAPTURE flag or null if end of string
// $sep[1] - the offset due to PREG_SPLIT_OFFSET_CAPTURE
$innerName = $getMiddleString($sep, $getNext(key($separators)));
$this->parseSeparator($sep, $separators, $result, $varname, $subCodeHandler, $innerName);
next($separators);
}
array_push($result, $varname);
return $result;
}