Veri ataması yapar

@param string $name
@param mixed $value
@param int $time
@return mixed
553221
public function set($name, $value, $time = 3600)
    {
        return $this->adapter->set($name, $value, $time);
    }
816323
public function setCookie(string $name, string $value, $time = 0): self
    {
        $this->cookie->set($name, $value, $time);

        return $this;
    }
1125612
public static function setCache($name, $value = '', $expired = 3600)
    {
        if (is_callable(self::$cache_callable['set'])) {
            return call_user_func_array(self::$cache_callable['set'], func_get_args());
        }
        $file = self::_getCacheName($name);
        $data = ['name' => $name, 'value' => $value, 'expired' => time() + intval($expired)];
        if (!file_put_contents($file, serialize($data))) {
            throw new LocalCacheException('local cache error.', '0');
        }
        return $file;
    }
1325592
public function datetimeLocal(String $name = NULL, String $value = NULL, Array $_attributes = [])
    {
        return $this->_input($name, $value, $_attributes, 'datetime-local');
    }
998353
public function setTimer(string $name, $value)
    {
        $this->timers[$name] = (string) $value;
        return $this;
    }
273526
static public function create_time($value=null)
    {
        return (empty($value)) ? time() : (is_numeric($value) ? $value : strtotime($value));
    }
250550
protected function cast(string $name, $value)
	{
		if(isset($this->cast[$name]) && $value !== null)
		{
			switch($this->cast[$name])
			{
				case 'int':
					return (int) $value;
				case 'float':
					return (float) $value;
				case 'bool':
					return $value === 'f' ? false : (bool) $value;
				case 'date':
					return ($value instanceof DateTimeInterface) ? $value : Time::createFromFormat($this->getDateFormat(), $value);
				case 'string':
					return (string) $value;
				default:
					throw new RuntimeException(vsprintf('Unsupported type [ %s ].', [$this->cast[$name]]));
			}
		}

		return $value;
	}
398992
public function time($name = null, $value = null, $attr = null)
    {
        return $this->createInput('time', $name, $value, $attr);
    }
134463
public function attr(string $name, $value = null) {
        if (is_null($value)) {
            return $this->getAttr($name);
        } else {
            return $this->setAttr($name, $value);
        }
    }
160568
protected function setCache($name, $value, $duration = null)
    {
        $duration === null && $duration = $this->cacheTime;
        return \Yii::$app->cache->set($this->getCacheKey($name), $value, $duration);
    }
978123
public static function set(string $name, $value)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if(isset(static::$configs[$first]))
            {
                return static::$configs[$first]->setVal($names, $value);
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
1327585
public static function set($key, $value, $time = 365)
    {
        $prefix = self::$prefix . $key;

        return setcookie($prefix, $value, time() + (86400 * $time), '/');
    }
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));
	}
478398
protected function datetime($name, $value, $format){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }       
        $date= \DateTime::createFromFormat($format, $value);        
        if($date){
            return TRUE;
        }else{
            $this->add_message($name, 'datetime', array('format' => $format));
            return FALSE;
        }        
    }
515875
public function pull($name, $value = '')
    {
        $value = $this->get($name, $value);
        $this->delete($name);

        return $value;
    }
1323821
public static function request(String $name = NULL, $value = NULL)
    {
        return self::_method($name, $value, $_REQUEST, __FUNCTION__);
    }
301149
public static function getInstance($value, $unit)
    {
        if (!array_key_exists($unit, self::UNIT)) {
            throw new InvalidArgumentException('Time unit "%s" is not recognized.', $unit);
        }
        $setter = 'set'.ucfirst($unit);

        return (new self)->$setter($value);
    }