addType() public method

Add a type
public addType ( string $pattern, Joli\Jane\Guesser\Guess\Type $type )
$pattern string
$type Joli\Jane\Guesser\Guess\Type
Example #1
0
 /**
  * {@inheritDoc}
  */
 public function guessType($object, $name, $classes)
 {
     $type = new PatternMultipleType($object);
     foreach ($object->getPatternProperties() as $pattern => $patternProperty) {
         $type->addType($pattern, $this->chainGuesser->guessType($patternProperty, $name, $classes), $pattern);
     }
     return $type;
 }