Sets or gets the read timeout to use for making requests.

@param integer $value If provided, sets the read timeout
@return integer The read timeout used for connecting to Braintree
332695
public static function timeout($value=null)
    {
        if (empty($value)) {
            return self::$global->getTimeout();
        }
        self::$global->setTimeout($value);
    }
216533
public function setValue($value)
    {
        if ($value instanceof DateInterval) {
            $value = Utils::now()->add($value);
        }

        if ($value instanceof DateTimeInterface) {
            $value = $value->getTimestamp();
        }

        return parent::setValue($value);
    }
763231
public function setCoreSessionCookieLifetime($value)
    {
        $this->setFieldName('session_cookie_lifetime');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }
1239670
public function setHash($value) {
        // TODO: freeze the instance after configuration and automatically call copy()

        if (isset($value)) {
            if (!is_scalar($value)) throw new IllegalTypeException('Illegal type of parameter $value: '.gettype($value));
            if (is_bool($value))
                $value = (int) $value;
        }
        $value = (string) $value;
        $path = $this->getPath();
        $this->setPath(strLeftTo($path, '#', $count=1, $includeLimiter=false, $onNotFound=$path).'#'.$value);

        return $this;
    }
194071
public function getOnlineAttribute($value)
    {
        $expiryDate = Carbon::now()
            ->subMinutes(config('session.lifetime'));

        return (!$this->logged_out)
            && $expiryDate->lt($this->last_active_at);
    }
388043
public static function getTS($value = null)
	{
		if ($value === null)
		{
			return sfDateTimeToolkit::now();
		}
		else if ($value instanceof sfDate)
		{
			return $value->get();
		}
		else if (!is_numeric($value))
		{
			return strtotime($value);
		}
		else if (is_numeric($value))
		{
			return $value;
		}
		
		throw new sfDateTimeException(sprintf('A timestamp could not be retrieved from the value: %s', $value));
	}
75430
public function add($value) {

		if($this->_ReadOnly){
			throw new ReadOnlyException(\get_called_class() . ' is read only');
		}
		
		$this->_Arr = \array_merge($this->_Arr, \func_get_args());
		
		return $this;
		
	}
906231
public function set($value = null)
	{
		$ts = sfDateTimeToolkit::getTS($value);
		
		$this->ts = $ts;
		if ($this->init === null)
		{
			$this->init = $ts;
		}
		
		return $this;
	}
808830
public function setStreamTimeout($value)
    {
        if ($value < 1) {
            $value = self::DEFAULT_STREAM_TIMEOUT;
        }

        $this->streamTimeout = (int) $value;
        if ($this->handle !== null) {
            stream_set_timeout($this->handle, 0, $this->getStreamTimeout());
        }
    }
997616
public function setStatus($value)
    {
        $allowedStatuses = self::allowedStatuses();

        if (!in_array($value, $allowedStatuses, true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_STATUS, implode(', ', $allowedStatuses)));
        }

        return $this->setAttribute('status', $value);
    }
1329106
public function set($key, $value, $timeOut=0) {
		$retRes = $this->driver->set($key, $value);
		if ($timeOut <= 0) {
			return $retRes;
		}
		$this->driver->expire($key, $timeOut);
		return true;
	}
590794
protected function parseIsScopeExcessAllowed(string $value): Client
    {
        $value === '1' ? $this->enableScopeExcess() : $this->disableScopeExcess();

        return $this;
    }
361387
public function setValue($value)
	{
		// any preparation goes here, for example casting to int
		$errors = $this->getValidationErrors($value);
		// if specific validation existed would go here & if
		// anything goes wrong will put error message into errors
		if(!empty($errors))
			throw $this->getContext()->getModel('ValidationException', 'Form', array(($errors)));
		return $value;
	}
799810
public function setIsHidden(int $value) : User
    {

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

        return $this;
    }
215477
public function set($key, $value, $timeout = 0) {
        try {
            $result = ($timeout == 0)
                ? $this->getRedis()->set($key, $value)
                : $this->getRedis()->psetex($key, $timeout, $value);
            if ($result !== false) {
                return $result;
            }
            throw new ImpossibleValueException();
        } catch (RedisException $ex) {
            throw new ConnectException();
        }
    }
998895
public static function toMilliseconds($value = null)
    {
        if (! $value) {
            return null;
        }

        if (! $value instanceof Carbon) {
            $value = Carbon::parse($value); // attempt to parse it
        }

        return (int) $value->timestamp * 1000;
    }
1306091
public function setHour( ?int $value = null ) : Time
   {

      if ( null === $value )
      {

         $this->_hours = static::CurrentHour();

         return $this;

      }

      $this->_hours = (int)$value;

      if ( $this->_hours < 0 )
      {
         $this->_hours = 0;
      }

      if ( $this->_hours > 23 )
      {
         $this->_hours = 23;
      }

      return $this;

   }