示例#1
0
 /**
  * @return TraverseSequence|MappedSequence
  */
 public function getChildren()
 {
     $x = $this->current();
     if ($this->canGoDeeper()) {
         return TraverseSequence::make($x, $this->key(), $this->pathSeparator)->setMaxDepth($this->depth - 1);
     } else {
         return IterationTraits::map(Sequence::make($x), FnGen::fnIdentity(), FnString::fnAddPrefix($this->key() . $this->pathSeparator));
     }
 }