protected function initializeValue($value)
    {
        if ($this->isEmpty($value) && ! $this->flags & Value::CAN_BE_EMPTY) {
            throw FailedToValidate::fromValueForClass($value, $this);
        }

        if (! $this->isEmpty($value)) {
            $value = $this->validate($value);
        }

        if (null === $value) {
            throw FailedToValidate::fromValueForClass($value, $this);
        }

        $this->value = $value;
    }
protected function initializeValue($value)
    {
        if ($this->isEmpty($value) && ! $this->flags & Value::CAN_BE_EMPTY) {
            throw FailedToValidate::fromValueForClass($value, $this);
        }

        if (! $this->isEmpty($value)) {
            $value = $this->validate($value);
        }

        if (null === $value) {
            throw FailedToValidate::fromValueForClass($value, $this);
        }

        $this->value = $value;
    }
protected function initializeValue ( $ value ) { if ( $ this -> isEmpty ( $ value ) && ! $ this -> flags & Value :: CAN_BE_EMPTY ) { throw FailedToValidate :: fromValueForClass ( $ value , $ this ) ; } if ( ! $ this -> isEmpty ( $ value ) ) { $ value = $ this -> validate ( $ value ) ; } if ( null === $ value ) { throw FailedToValidate :: fromValueForClass ( $ value , $ this ) ; } $ this -> value = $ value ; }
Initialize the value.

@since 0.1.1

@param $value
Initialize the value .