@param string $value

@return Client
543762
protected function parseIsImplicitAuthEnabled(string $value): Client
    {
        $value === '1' ? $this->enableImplicitGrant() : $this->disableImplicitGrant();

        return $this;
    }
752236
public static function getHost($value)
    {
        if (preg_match(self::REGEXP_TCP, $value, $matches)) {
            return preg_replace("/^http:/", "tcp:", $matches[2]);
        }

        if (preg_match(self::REGEXP_SSL, $value, $matches)) {
            return preg_replace("/^https:/", "ssl:", $matches[2]);
        }

        return null;
    }
1027849
public static function proxyHost($value = null)
    {
        if (empty($value)) {
            return self::$global->getProxyHost();
        }
        self::$global->setProxyHost($value);
    }
1141494
protected function parseIsCodeAuthEnabled(string $value): Client
    {
        $value === '1' ? $this->enableCodeGrant() : $this->disableCodeGrant();

        return $this;
    }
1043942
public static function url(string $value): self
    {
        return new self(Implementation::uuid5(Implementation::NAMESPACE_URL, $value)->toString());
    }
82222
public function def($path, $value = '')
    {
        $value = $this->get($path, $value);
        $this->set($path, $value);

        return $this;
    }
1283951
protected function Add( $value )
	{
		switch ( $value->GetValueCode() )
	    {
	        case DayTimeDurationProxyFactory::Code:
	        	/**
	        	 * @var DayTimeDurationProxy $value
	        	 */
	        	$clone = new DayTimeDurationValue( $this->_value->Value );
	        	$clone->Add( /* DayTimeDurationValue */ $value->getValue() );
	        	return new DayTimeDurationProxy( $clone );

	        case DateTimeProxyFactory::Code:
	        	/**
	        	 * @var DateTimeProxy $value
	        	 */
	            return new DateTimeProxy( DateTimeValue::AddDayTimeDuration( $value->getValue(), $this->_value ) );

	        case DateProxyFactory::Code:
	        	/**
	        	 * @var DateProxy $value
	        	 */
	        	return new DateProxy( DateValue::AddDayTimeDuration( $value->getValue(), $this->_value ) );
	        	// return new DateProxy(DateValue::Add( /* DateValue */ $value->getValue(),  $this->_value) );

	        case TimeProxyFactory::Code:
	            return new TimeProxy( TimeValue::AddDayTimeDuration( /* TimeValue */ $value->getValue(),  $this->_value) );

	        default:
	            throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:add",
						SequenceType::WithTypeCodeAndCardinality(SequenceType::GetXmlTypeCodeFromObject( $this->_value ), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality(SequenceType::GetXmlTypeCodeFromObject( $value->getValue() ), XmlTypeCardinality::One )
					)
				);
	    }
	}
283766
private function stringifyValue($value)
    {
        switch (true) {
            case $value === null:
                $value = 'NULL';
                break;
            case ($value instanceof \DateTime):
                $value = $value->format(DATE_RFC822);
                break;
            case ($value instanceof StringableInterface):
                $value = $value->toString();
                break;
            case ($value instanceof ArrayableInterface):
                $value = sprintf('Arrayable::%s (%s)', (new \ReflectionObject($value))->getShortName(),
                    $this->stringifyValue($value->toArray()));
                break;
            case is_scalar($value):
            case method_exists($value, '__toString'):
                $value = (string) $value;
                break;
            case is_object($value):
                $value = sprintf('Object (%s)', get_class($value));
                break;
            case is_array($value):
                $value = sprintf('Array (%s)', implode(', ', array_map([$this, 'stringifyValue'], $value)));
                break;
        }
        
        return $value;
    }
203915
public function setUserValue(string $value) : self
    {
        $this->user_value = $value;
        $this->is_valid = null;
        return $this;
    }
197635
public static function Create( $value )
	{
		if ( $value instanceof ValueProxy )
			return $value;
		try
		{
			if ( $value instanceof XPath2Item )
			{
				$valueType = $value->getValueType();
				$typeName = $valueType->getTypeName();
				$value = $value->getTypedValue();
			}
			else if ( $value instanceof IXmlSchemaType )
			{
				$typeName = $value::$CLASSNAME;
			}
			else
			{
				$typeName = Type::FromValue( $value )->getTypeName();
			}

			if ( ! isset( ValueProxy::$valueFactory[ $typeName ] ) )
			{
				throw new KeyNotFoundException();
			}

			return ValueProxy::$valueFactory[ $typeName ]->Create( $value );
		}
		catch ( KeyNotFoundException $ex )
		{
			$className = get_class( $value );
			if ( is_null( $value ) )
				throw XPath2Exception::withErrorCodeAndParam( "XPTY0004", "The type {0} is not registred in ValueProxy", $className);
			else
				throw new InvalidCastException( "The type {$className} is not registred in ValueProxy" );
		}
	}
771937
public function setValue($value)
    {
        $this->value = $value;
        if ($value instanceof ValueAwareInterface) {
            $this->value = $value->getFormValue();
        }
        return $this;
    }
806900
protected function parseIsUseDefaultScope(string $value): Client
    {
        $value === '1' ? $this->useDefaultScopesOnEmptyRequest() : $this->doNotUseDefaultScopesOnEmptyRequest();

        return $this;
    }
1046676
public static function castFrom($value): InputStream
    {
        if ($value instanceof InputStream) {
            return $value;
        }

        if (is_string($value)) {
            return new self($value);
        }

        throw new \InvalidArgumentException(
                'Given value is neither an instance of' . InputStream::class
                . ' nor a string denoting a file'
        );
    }
758937
public function setValue($value)
    {
        // Set name in payload
        $payload = $this->getPayload();
        $payload['value'] = $value;

        return $this->setPayload($payload);
    }
84423
protected function Add( $value )
	{
		switch ( $value->GetValueCode() )
		{
			case YearMonthDurationProxyFactory::Code:
				/**
				 * @var YearMonthDurationProxy $value
				 */
				// Clone the DateValue contained in the proxy or the original is changed
				$clone = DateTimeValue::fromDate( $this->_value->S, $this->_value->Value, ! $this->_value->IsLocal );
				return new DateTimeProxy( DateTimeValue::AddYearMonthDuration( $clone, $value->getValue() ) );
				// return new DateTimeProxy( DateTimeValue::Add(  $this->_value, /* YearMonthDurationValue */ $value->getValue() ) );

			case DayTimeDurationProxyFactory::Code:
				/**
				 * @var DayTimeDurationProxy $value
				 */
				// Clone the DateValue contained in the proxy or the original is changed
				$clone = DateTimeValue::fromDate( $this->_value->S, clone $this->_value->Value );
				return new DateTimeProxy( DateTimeValue::AddDayTimeDuration( $clone, $value->getValue() ) );
				// return new DateTimeProxy( DateTimeValue::Add(  $this->_value, /* DayTimeDurationValue*/ $value->getValue() ) );

			default:
				throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:add",
						SequenceType::WithTypeCodeAndCardinality(SequenceType::GetXmlTypeCodeFromObject( $this->_value), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality(SequenceType::GetXmlTypeCodeFromObject( $value->getValue() ), XmlTypeCardinality::One )
					)
				);
		}
	}
640367
function fromResource($value)
    {
        $this->clear();
        $this->orignalValue = $this->returnValue  = stream_get_contents($value);
        return $this->parse();
    }
7396
public function setName(?string $value) : User
    {

        if ($this->data['name'] !== $value) {
            $this->data['name'] = $value;
            $this->setModified('name');
        }

        return $this;
    }