@param Value\ConcreteValueInterface $value

@return \Eloquent\Schemer\Constraint\Schema
438333
public function create(Value\ConcreteValueInterface $value)
    {
        if (null !== $this->metaSchema()) {
            $result = $this->constraintValidator()->validate(
                $this->metaSchema(),
                $value
            );
            if (!$result->isValid()) {
                throw new Exception\InvalidSchemaException($value, $result);
            }
        }

        $this->clear();
        $schema = $this->createSchema($value);
        $this->clear();

        return $schema;
    }
1276504
public function processParameterValue($value)
    {
        if (is_scalar($value)) {
            return $value;
        }

        if ($value instanceof Collection) {
            $value = $value->toArray();
        }

        if (is_array($value)) {
            foreach ($value as $key => $paramValue) {
                $paramValue  = $this->processParameterValue($paramValue);
                $value[$key] = is_array($paramValue) ? reset($paramValue) : $paramValue;
            }

            return $value;
        }

        if (is_object($value) && $this->_em->getMetadataFactory()->hasMetadataFor(ClassUtils::getClass($value))) {
            $value = $this->_em->getUnitOfWork()->getSingleIdentifierValue($value);

            if ($value === null) {
                throw ORMInvalidArgumentException::invalidIdentifierBindingEntity();
            }
        }

        if ($value instanceof Mapping\ClassMetadata) {
            return $value->name;
        }

        return $value;
    }
1172248
protected function getSerializedPropertyValue($value)
    {
        return ($value instanceof QueueableEntityInterface)
            ? new ModelIdentifier(get_class($value), $value->getQueueableId()) : $value;
    }
103194
public function setValue($value): FieldTypeInterface
    {
        $this->value = $this->transformer->transform($value);

        return $this;
    }
34764
public static function createFloat($value)
    {
        if ($value instanceof NumericTypeInterface) {
            return $value->asFloatType();
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException("'{$value}' is no valid numeric for FloatType");
        }
        
        if (self::getRequiredType() == self::TYPE_GMP) {
            return RationalTypeFactory::create($value);
        }
        
        return new FloatType($value);
    }
1162019
public function setValue($value) {
		if (!$this->isPrimitive($value)) {
			throw new \InvalidArgumentException('Use setValue() only for primitives and PhpConstant, anyway use setExpression() instead.');
		}
		$this->value = $value;
		$this->hasValue = true;

		return $this;
	}
66820
public function initializeEntity(SchemaInterface $schema)
    {
        $valueSet = $this->createValueSet();
        $valueSet->setSchema($schema);

        // To avoid persisting Value entities with no actual value to the database
        // we create empty ones, that will be removed on postPersist events.
        $this->replaceEmptyValues($valueSet);

        $entity = $schema->getObjectClass();
        $entity = new $entity();

        if (!$entity instanceof EntityInterface) {
            throw new \Exception(sprintf('The entity specified in schema "%d" schema must implement Opifer\EavBundle\Model\EntityInterface.', $schema->getId()));
        }

        $entity->setValueSet($valueSet);
        $entity->setSchema($schema);

        return $entity;
    }
278220
protected function createItemsConstraint(Value\ObjectValue $value)
    {
        if (
            !$value->has('items') &&
            !$value->has('additionalItems')
        ) {
            return null;
        }

        $schemas = array();
        $additionalSchema = null;
        if ($value->has('items')) {
            if ($value->get('items') instanceof Value\ArrayValue) {
                foreach ($value->get('items') as $subValue) {
                    $schemas[] = $this->createSchema($subValue);
                }
            } else {
                $additionalSchema = $this->createSchema($value->get('items'));
            }
        }

        if (null === $additionalSchema && $value->has('additionalItems')) {
            if ($value->get('additionalItems') instanceof Value\BooleanValue) {
                if (!$value->getRaw('additionalItems')) {
                    $additionalSchema = new Schema(
                        array(new ArrayValue\AdditionalItemConstraint)
                    );
                }
            } else {
                $additionalSchema = $this->createSchema($value->get('additionalItems'));
            }
        }

        if (null === $additionalSchema) {
            $additionalSchema = new Schema;
        }

        return new ArrayValue\ItemsConstraint($schemas, $additionalSchema);
    }
559233
public function fromBigQuery(array $value, array $schema)
    {
        $value = $value['v'];

        if (isset($schema['mode'])) {
            if ($schema['mode'] === 'REPEATED') {
                return $this->repeatedValueFromBigQuery($value, $schema);
            }

            if ($schema['mode'] === 'NULLABLE' && $value === null) {
                return $value;
            }
        }

        switch ($schema['type']) {
            case self::TYPE_BOOLEAN:
                return $value === 'true';
            case self::TYPE_INTEGER:
                return $this->returnInt64AsObject
                    ? new Int64($value)
                    : (int) $value;
            case self::TYPE_FLOAT:
                return (float) $value;
            case self::TYPE_NUMERIC:
                return new Numeric($value);
            case self::TYPE_STRING:
                return (string) $value;
            case self::TYPE_BYTES:
                return new Bytes(base64_decode($value));
            case self::TYPE_DATE:
                return new Date(new \DateTime($value));
            case self::TYPE_DATETIME:
                return new \DateTime($value);
            case self::TYPE_TIME:
                return new Time(new \DateTime($value));
            case self::TYPE_TIMESTAMP:
                return $this->timestampFromBigQuery($value);
            case self::TYPE_RECORD:
                return $this->recordFromBigQuery($value, $schema['fields']);
            default:
                throw new \InvalidArgumentException(sprintf(
                    'Unrecognized value type %s. Please ensure you are using the latest version of google/cloud.',
                    $schema['type']
                ));

                break;
        }
    }
921708
public static function createByValue($value)
    {
        $constants = self::getConstantsByValue();

        if (!array_key_exists($value, $constants)) {
            throw EnumException::invalidValue(get_called_class(), $value);
        }

        return new static ($value);
    }
321678
function MapValue($value)
    {
        if ($value === null)
            return $value;
        
        if ($this->IsRelatedObject($value) || $this->IsDatabaseObject($value))
            return $value;
        
        else if (!is_object($value) && !is_array($value))
        {
            if ($this->relatedSchema)
                return $this->relatedSchema->CreateInstance($value);
            else
                return $this->type->FromDBString((string)$value);
        }

        //no more object types mappable.
        throw new \InvalidArgumentException('Invalid argument for fieldmapper. Object could not be mapped');
    }
198024
public static function factory($value): FormatInterface
    {
        $data = Data::make($value);

        return self::evaluate($data)->isInstanceOf(FormatInterface::class)->getValue();
    }
199968
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context,
        int $tryCounter = 0
    ): ResolvedValueWithFixtureSet {
        $this->checkResolver(__METHOD__);
        $tryCounter = $this->incrementCounter($tryCounter, $value, $this->limit);

        /**
         * @var UniqueValue        $generatedValue
         * @var ResolvedFixtureSet $fixtureSet
         */
        list($generatedValue, $fixtureSet) = $this->generateValue($value, $fixture, $fixtureSet, $scope, $context);

        if ($this->pool->has($generatedValue)) {
            return $this->resolve($value, $fixture, $fixtureSet, $scope, $context, $tryCounter);
        }

        $this->pool->add($generatedValue);

        return new ResolvedValueWithFixtureSet($generatedValue->getValue(), $fixtureSet);
    }
871700
protected function createMaximumDateTimeConstraint(Value\ConcreteValueInterface $value)
    {
        if ($value instanceof Value\DateTimeValue) {
            return new DateTimeValue\MaximumDateTimeConstraint($value->value());
        }

        return new DateTimeValue\MaximumDateTimeConstraint(
            new DateTime($value->value())
        );
    }
1063800
protected function createAnyOfConstraint(Value\ArrayValue $value)
    {
        $schemas = array();
        foreach ($value as $subValue) {
            $schemas[] = $this->createSchema($subValue);
        }

        return new Generic\AnyOfConstraint($schemas);
    }
1061953
public function hydrate($value)
    {
        if ($value === null) {
            return $this->schema->getDefault();
        }

        if (!is_string($value)) {
            return $value;
        }

        return !ctype_digit($value) ? (float)$value : (int)$value;
    }
779692
public function getReflClassFromComparisonValue( $value )
    {

        if( is_array($value) ) {
            $class = $this->namespace . '\\FindFilterComponent\\PropertyAccessArrayEquality';
        } elseif ( is_object($value) and $value instanceof Container ) {
            $class = $this->namespace . '\\FindFilterComponent\\PropertyAccessContainerEquality';
        } else {
            $class = $this->namespace . '\\FindFilterComponent\\PropertyAccessScalarEquality';
        }
        return new ReflectionClass($class);
    }