示例#1
0
 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;
     }
 }
示例#2
0
 public function __construct($value, $position = 0, MutateableString $parent)
 {
     parent::__construct($value, $position);
     $this->parent = $parent;
 }