original_string: public function setRootAndPath(Document $root, $path)
      {
          Archive::set($this, 'root_and_path', array('root' => $root, 'path' => $path));
  
          if (isset($this->data['embeddedsOne'])) {
              foreach ($this->data['embeddedsOne'] as $name => $embedded) {
                  $embedded->setRootAndPath($root, $path.'.'.$name);
              }
          }
  
          if (isset($this->data['embeddedsMany'])) {
              foreach ($this->data['embeddedsMany'] as $name => $embedded) {
                  $embedded->setRootAndPath($root, $path.'.'.$name);
              }
          }
      }
code: public function setRootAndPath(Document $root, $path)
      {
          Archive::set($this, 'root_and_path', array('root' => $root, 'path' => $path));
  
          if (isset($this->data['embeddedsOne'])) {
              foreach ($this->data['embeddedsOne'] as $name => $embedded) {
                  $embedded->setRootAndPath($root, $path.'.'.$name);
              }
          }
  
          if (isset($this->data['embeddedsMany'])) {
              foreach ($this->data['embeddedsMany'] as $name => $embedded) {
                  $embedded->setRootAndPath($root, $path.'.'.$name);
              }
          }
      }
code_tokens: public function setRootAndPath ( Document $ root , $ path ) { Archive :: set ( $ this , 'root_and_path' , array ( 'root' => $ root , 'path' => $ path ) ) ; if ( isset ( $ this -> data [ 'embeddedsOne' ] ) ) { foreach ( $ this -> data [ 'embeddedsOne' ] as $ name => $ embedded ) { $ embedded -> setRootAndPath ( $ root , $ path . '.' . $ name ) ; } } if ( isset ( $ this -> data [ 'embeddedsMany' ] ) ) { foreach ( $ this -> data [ 'embeddedsMany' ] as $ name => $ embedded ) { $ embedded -> setRootAndPath ( $ root , $ path . '.' . $ name ) ; } } }
docstring: Set the root and path of the embedded document.
  
  @param \Mandango\Document\Document $root The root document.
  @param string                      $path The path.
  
  @api
docstring_tokens: Set the root and path of the embedded document .