/**
  *  Allows the description of the selector
  *
  *  @access public
  *  @return \Faker\Components\Engine\Entity\Builder\NodeBuilder
  */
 public function swapAt($number)
 {
     # create new node builder
     $nodeBuilder = new TypeBuilder('swapSelectorBuilder', $this->eventDispatcher, $this->repo, $this->utilities, $this->generator, $this->locale, $this->database, $this->templateLoader);
     $this->positionManagers[] = new PositionManager($number);
     # bind this definition as the parent of nodebuilder
     $nodeBuilder->setParent($this);
     # return node builder to continue chain
     return $nodeBuilder;
 }
Esempio n. 2
0
 /**
  *  Return a builder that allows combination of types to combine in a single return value
  *
  *  @access public
  *  @return \Faker\Components\Engine\Entity\Builder\TypeBuilder
  */
 public function combination()
 {
     # this is a little evil (typebuilder is child of nodebuilder) but avoid alot of copy and paste
     $node = new TypeBuilder($this->name, $this->eventDispatcher, $this->repo, $this->utilities, $this->generator, $this->locale, $this->database, $this->templateLoader);
     $node->setParent($this);
     return $node;
 }