code: public function setFrame($path, $page)
      {
          $name = array_shift($path);
          if (isset($this->names[$name])) {
              $index = $this->names[$name];
          } else {
              $index = $name - 1;
          }
          if (count($path) === 0) {
              $this->frames[$index] = $page;
  
              return;
          }
          $this->frames[$index]->setFrame($path, $page);
      }
docs: Replaces existing frame with another.
  If the frame is nested, then the call is passed down one level.
  
  @param array $path        Path of frame in frameset.
  @param SimplePage $page   Frame source.