Exemplo n.º 1
0
 /**
  * Factory method to create type instances.
  * AbstractType instances are implemented as flyweights.
  *
  * @param $value
  *
  * @return DataValueInterface
  */
 public function getDataValueFromValue($value)
 {
     if (null === $value) {
         return new NullValue();
     }
     $typeName = $this->typeFactory->getTypeFromValue($value);
     return $this->createValue($typeName, $value);
 }