protected function parse() { $this->chars = array(); for ($i = 0; $i < $this->length(); $i++) { $char = new StaticChar($this->value[$i], $i); if ($prev = $this->offsetGet($i - 1)) { $char->prev($prev); $prev->next($char); } $this->chars[] = $char; } }
public function __construct($value, $position = 0, MutateableString $parent) { parent::__construct($value, $position); $this->parent = $parent; }