Append a flash value with a numeric key for the *next* request.

@param mixed $val The flash value itself.
548448
public function addFlash($val)
    {
        $this->resumeOrStartSession();
        $_SESSION[Session::FLASH_NEXT][$this->name][] = $val;
    }
1272833
public function setToTemplate($var, $val)
    {
        $args = func_get_args();
        array_shift($args);
        $this->templateFallback($var, $args, 'set');
        return $this;
    }
669200
public function decrement($key, $val = 1)
    {
        return apc_dec($this->conf['prefix'] . $key, abs(intval($val)));
    }
308796
protected function Sub( $val )
	{
		if ( ! $val instanceof ByteProxy ) throw new \InvalidArgumentException();
		return new IntProxy( $this->_value - $val->_value );
	}
124108
protected function Add( $val )
	{
		if ( ! $val instanceof ByteProxy ) throw new \InvalidArgumentException();
		return new IntProxy( $this->_value + $val->_value );
	}
797951
public function emit($val, $key = null)
    {
        $this->_result[$key === null ? $this->_counter : $key] = $val;
        $this->_counter++;
    }
901968
public function addAttrib($key, $val)
    {
        $this->_attribs = array_merge(array($key => $val), $this->_attribs);
    }
292726
def append(self, val):
        
        self.values.append(val)
        self.value = self.values[0]
796461
private function set($var, $val) {
		$this->vars[$var] = $val;
		
		// We also need to set $var on each sub-template. So recursively do that
		foreach($this->forTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);

		foreach($this->ifTemplates as $templateBunch)
			foreach($templateBunch as $sub)
				$sub->set($var, $val);
		
		foreach($this->incTemplates as $sub)
			$sub->set($var, $val);
	}
226078
public function addElement($key, $val)
    {
        $this->myData = array_merge($this->myData, array((String)$key => $val));
    }
79434
private function encodeValue($val, $base)
    {
        $this->preOpMethodParamsCheck(array($val, $base));

        $digits = $this->baseCheck($base);

        try {

            $new = '';

            while ($this->math->comp($val, '0') > 0) {
                $qq  = $this->math->div($val, $base);
                $rem = $this->math->mod($val, $base);
                $val = $qq;
                $new = $new . $digits[$rem];
            }

            return $new;

        } catch (\Exception $e) {
            throw $e;
        }
    }
1124628
public function flash($key, $value)
    {
        $_SESSION[$this->config['key']]['flash'][$key] = $value;
        $this->flash[$key] = $value;
    }
631407
public function save($val)
    {
        // Current ident
        $i = $this->ident();

        // Upload file, if in request.
        if (isset($_FILES[$i])
            && (isset($_FILES[$i]['name']) && $_FILES[$i]['name'])
            && (isset($_FILES[$i]['tmp_name']) && $_FILES[$i]['tmp_name'])
        ) {
            $file = $_FILES[$i];

            if (is_array($file['name']) && $this->multiple() && $this->l10n()) {
                $f = [];
                foreach ($file['name'] as $lang => $langVal) {
                    $f[$lang] = [];
                    if (!$file['name'][$lang]) {
                        $f[$lang] = isset($val[$lang]) ? $val[$lang] : '';
                        continue;
                    }
                    $k = 0;
                    $total = count($file['name'][$lang]);
                    for (; $k < $total; $k++) {
                        $data = [];
                        $data['name'] = $file['name'][$lang][$k];
                        $data['tmp_name'] = $file['tmp_name'][$lang][$k];
                        $data['error'] = $file['error'][$lang][$k];
                        $data['type'] = $file['type'][$lang][$k];
                        $data['size'] = $file['size'][$lang][$k];

                        $f[$lang][] = $this->fileUpload($data);
                    }
                }
            } elseif (is_array($file['name']) && $this->multiple()) {
                $f = [];
                $k = 0;
                $total = count($file['name']);
                for (; $k < $total; $k++) {
                    $data = [];
                    $data['name'] = $file['name'][$k];
                    $data['tmp_name'] = $file['tmp_name'][$k];
                    $data['error'] = $file['error'][$k];
                    $data['type'] = $file['type'][$k];
                    $data['size'] = $file['size'][$k];

                    $f[] = $this->fileUpload($data);
                }
            } elseif (is_array($file['name']) && $this->l10n()) {
                // Not so cool
                // Both the multiple and l10n loop could and
                // should be combined into one.
                // Not sure how
                $f = [];
                foreach ($file['name'] as $lang => $langVal) {
                    $data = [];

                    if (!$file['name'][$lang]) {
                        $f[$lang] = isset($val[$lang]) ? $val[$lang] : '';
                        continue;
                    }
                    $data['name'] = $file['name'][$lang];
                    $data['tmp_name'] = $file['tmp_name'][$lang];
                    $data['error'] = $file['error'][$lang];
                    $data['type'] = $file['type'][$lang];
                    $data['size'] = $file['size'][$lang];

                    $f[$lang] = $this->fileUpload($data);
                }
            } else {
                $f = $this->fileUpload($file);
            }

            return $f;
        }

        // Check in vals for data: base64 images
        // val should be an array if multiple...
        if ($val !== null) {
            if ($this->l10n()) {
                $l10nVal = ($val instanceof Translation) ? $val->data() : $val;

                $f = [];
                foreach ($l10nVal as $v) {
                    if ($this->isDataUri($v)) {
                        $f[] = $this->dataUpload($v);
                    }
                }

                if (!empty($f)) {
                    return $f;
                }
            } elseif ($this->multiple()) {
                $f = [];
                foreach ($val as $v) {
                    if ((is_array($v) && isset($v['id'])) || $this->isDataUri($v)) {
                        $f[] = $this->dataUpload($v);
                    }
                }

                if (!empty($f)) {
                    return $f;
                }
            } elseif ($this->isDataUri($val)) {
                $f = $this->dataUpload($val);

                return $f;
            }
        }

        return $val;
    }
1320923
public function setValue($key, $val)
    {
        file_put_contents(
            $this->file,
            sprintf("\$values[%s] = %s;\n", var_export($key, true), var_export($val, true)),
            FILE_APPEND
        );
    }
348487
public static function setContextDataByKey(string $key, $val)
    {
        $coroutineId = self::getcoroutine();
        self::$coroutineLocal[$coroutineId][self::COROUTINE_DATA][$key] = $val;
    }
1286698
protected function Div($val)
	{
		$result = DecimalValue::FromValue( $this->_value )->Div( $val->getValue() );
		return new DecimalProxy( $result );
	}
700600
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $this->locals = array_merge($this->locals->all(), $key);
        } else {
            $this->locals[$key] = $val;
        }
        return $this;
    }