@param      $key
@param null $val

@return $this
433441
public function setAndSave($key, $val = null)
    {
        $this->set($key, $val);
        $this->save();

        return $this;
    }
1223074
function push($key,$val) {
		$ref=&$this->ref($key);
		$ref[]=$val;
		return $val;
	}
911864
public function data($key, $value=null) :self {
		// if we have an array of data
		if(is_array($key)) {
			// for each of those
			foreach($key as $index => $value) {
				// set them
				$this->data($index, $value);
			}
		}
		else {
			// set a value
			$this->data[$key] = $value;
		}
		// return self
		return $this;
	}
1365503
public function set($key, $value = null)
    {
        if (is_array($key))
        {
            foreach ($key as $name => $value)
            {
                $this->_data[$name] = $value;
            }
        }
        else
        {
            $this->_data[$key] = $value;
        }

        return $this;
    }
150955
public function addEditorOption($key, $val)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'Setting key must be a string.'
            );
        }

        // Make sure default options are loaded.
        if ($this->editorOptions === null) {
            $this->editorOptions();
        }

        $this->editorOptions[$key] = $val;

        return $this;
    }
729620
public function assign($key, $val = null)
    {
        if (is_array($key)) {
            $this->args = array_merge($this->args, $key);
        } else {
            $this->args[$key] = $val;
        }
        return $this;
    }
806252
public function setData($key, $value=null)
	{
	    $this->data->set($key, $value);
	    return $this;
	}
1140728
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $_SESSION = array_merge($_SESSION, $key);
        } else {
            $this->offsetSet($key, $val);
        }
        return $this;
    }
429846
public function set($key, $value = null)
    {
        if( is_array($key) ) {
            $this->values($key);
        } else {
            $this->value($key, $value);
        }
        return $this;
    }
507124
public function setData($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $key => $value) {
                if (!is_array($value) && !is_object($value)) {
                    $this->$key = $value;
                }
            }
        } else {
            $this->$key = $value;
        }

        return $this;
    }
447096
private function _setBool($key, $val) {
		if ($key && !$val) {
			$this->_result = preg_replace("/<if\." . $key . ">(.*?)<\/if\." . $key . ">/s", '', $this->_result);
		}
		$this->_result = str_replace("<if." . $key . ">", '', $this->_result);
		$this->_result = str_replace("</if." . $key . ">", '', $this->_result);
	}
906035
public function with($key, $value = null)
    {
        if (is_array($key)) {
            $this->_data = array_merge($this->_data, $key);
        } else {
            $this->_data[$key] = $value;
        }

        return $this;
    }
484224
public function get($key, $default_val = null)
    {
        $key = $this->normalizeKey($key);

        return parent::get($key, $default_val);
    }
234949
public function flash($key, $val)
    {
        $this->set($key, $val);
        $this->setSessionInfo($key, 'expire', true);
    }
347230
public function addSelectOption($key, $val)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'Setting key must be a string.'
            );
        }

        // Make sure default options are loaded.
        if ($this->dualSelectOptions === null) {
            $this->dualSelectOptions();
        }

        $this->dualSelectOptions[$key] = $val;

        return $this;
    }
777102
public function cache($key, callable $val)
    {
        if (!array_key_exists($key, $this->cache)) {
            $this->cache[$key] = $val();
        }

        return $this->cache[$key];
    }
376060
public function with($key, $value = null)
    {
        if (is_array($key)) {
            $this->viewData = array_merge($this->viewData, $key);
        } else {
            $this->viewData[$key] = $value;
        }

        return $this;
    }