@param string

@return $this
189225
public function setKey($key)
    {
        parent::setKey($key);

        foreach ($this->getHandlers() as $handler) {
            $handler->setKey($key);
        }

        return $this;
    }
1081117
public function setString($string)
    {
        if (null === $string) {
            throw new Exception('The string cannot be null.');
        }

        $this->hash = md5($string);

        $this->convertHashToArrayOfBoolean();

        return $this;
    }
431730
public function setQuery(?string $query = null): self
    {
        $this->query = $query;
        $this->query = $this->query ?? '';

        return $this;
    }
586931
protected function setValue($value)
    {
        if (!isset($this->value) || null === $this->value) {
            $this->value = $value;
        }

        return $this;
    }
690745
public function prepend($str)
    {
        $value = $this->val();
        $this->val($str . $value);

        return $this;
    }
931256
public function setName($name)
    {
        if (null !== $name) {
            $this->name = (string) $name;
        } else {
            $this->name = $name;
        }

        return $this;
    }
1186110
public function prepend(string $string): self
    {
        return new self($string.(string) $this, $this->encoding);
    }
487548
public function importFromString($string)
    {
        $this->_paymentMethodsArray = unserialize(urldecode($string));
        $this->_paymentMethodsArrayFiltered = $this->_paymentMethodsArray;
        return $this;
    }
778336
public function string()
    {
        if (!is_string($this->value)) {
            throw new InvalidStringException($this->name, $this->value);
        }

        return $this;
    }
554627
public function make($string)
    {
        $options = array();
        foreach (explode(',', $string) as $pair) {
            $parts = explode(':', $pair, 2);
            if (count($parts) === 2) {
                list($key, $value) = $parts;
                $options[$key] = $value;
            }
        }
        $class = get_class($this);
        return new $class($options);
    }
380790
public function setValue($value)
    {
        parent::setValue($value);
        if ($this->hasAttribute('value')) {
            $this->getAttributes()->remove('value');
        }
        return $this;
    }
1339199
public function parseString($string)
    {
        $string = (string) $string;
        $string = preg_replace_callback("/\\$\{(.*?)\}/",
            function ($k) {
                return $this->get($k[1]);
            }, $string);

        return $string;
    }
393795
public function loadHTML($string)
    {
        $this->html = (string) $string;
        $this->file = null;
        return $this;
    }
758432
public function sub($string)
    {
        $this->timestamp = $this->getTimestamp() - $this->evaluateDateString($string);

        return $this;
    }
500773
public function prependF ($string)
	{
		ensure('Argument', $string, 'is_a_string', __CLASS__, __METHOD__);

		if ($string instanceof self) {
			$string = $string->to_s();
		}

		$this->string = $string . $this->string;

		return $this;
	}
388137
public function delete($value)
    {
        $index = $this->index($value);

        if ($index !== false) {
            $this->remove($index);
        }

        return $this;
    }
906571
public function insert($index, $string)
    {
        // NOTE: This could be slightly confusing as the parameters
        // are back to front. I guess I could change the Str version...

        $this->str = $this->str->insert((string)$string, $index);

        return $this;
    }