@param           $name
@param null      $value
@param null|bool $literal

@return mixed
@throws KeyDoesNotExistException
1721
public function item($name, $value = null, $literal = null)
    {
        $literal = is_null($literal) ? $this->isLiteral() : $literal;

        func_num_args() < 2 || $this->items[$name] = $value;

        if (!$literal) {
            return $this->find($name, $this->items);
        }

        isset($this->items[$name]) || $this->throwKeyDoesNotExist($name);

        return $this->items[$name];
    }
192523
public function jsvar($name, $value = null)
    {
        if (is_string($name)) {
            $this->jsvalues[$name] = $value;
        }
        if (is_array($name)) {
            $this->jsvalues = array_merge($this->jsvalues, $name);
        }
        return $this;
    }
124543
public function tel($name, $value = null, $options = [])
    {
        return $this->input('tel', $name, $value, $options);
    }
170418
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) return $value;

        if ( ! is_null($this->old($name)))
        {
            return $this->old($name);
        }

        if ( ! is_null($value)) return $value;

        if ($this->checkIfModelExists())
        {
            return $this->getModelValueAttribute($name);
        }

        if ($this->canUpdateValueWithSessionLang())
        {
            $language_input = $this->getOldLanguageInput();
            if($this->isAValidFormAttribute($name, $language_input)) return $language_input[$name];
        }
    }
511080
public static function set($name, $value = null)
	{
		$names = parseCfgName($name);
		if (isset($names[0]))
		{
			$first = array_shift($names);
			$obj = self::getInstance($first);
			if ($obj)
			{
				return $obj->setVal($names, $value);
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
1118636
public function set($name, $value = null)
    {
        if ($name === 'value') {
            $value = htmlspecialchars($value);
        }
        parent::set($name, $value);

        return $this;
    }
750237
protected function _translateValue( $name, $value )
	{
		if( isset( $this->_plugins[$name] ) ) {
			return $this->_plugins[$name]->translate( $value );
		}

		return $value;
	}
770989
public function createLiteral($value, $datatype = null, $lang = null)
    {
        if ($datatype !== null) {
            if (!$datatype instanceof Node) {
                $datatype = $this->createNamedNode($datatype);
            } elseif (!$datatype->isNamed()) {
                throw new \Exception('Argument datatype has to be a named node.');
            }
        }

        return new LiteralImpl($value, $datatype, $lang);
    }
318504
private function recursiveDump(&$value, $name): void
  {
    switch (true)
    {
      case is_null($value):
        $this->dumpNull($value, $name);
        break;

      case is_bool($value):
        $this->dumpBool($value, $name);
        break;

      case is_float($value):
        $this->dumpFloat($value, $name);
        break;

      case is_int($value):
        $this->dumpInt($value, $name);
        break;

      case is_string($value):
        if (is_string($name) && stripos($name, 'password')!==false)
        {
          // Do not dump the value of a variable/key with a name tha contains 'password'.
          $tmp = str_repeat('*', 12);
          $this->dumpString($tmp, $name);
        }
        else
        {
          $this->dumpString($value, $name);
        }
        break;

      case is_object($value):
        $this->dumpObject($value, $name);
        break;

      case is_array($value):
        $this->dumpArray($value, $name);
        break;

      case is_resource($value):
        $this->dumpResource($value, $name);
        break;

      default:
        throw new FallenException('type', gettype($value));
    }
  }
1133591
protected function getFieldValue($value, $name)
    {
        if (!is_null($value)) {
            $modelVariable = $this->getSingularVariable($this->modelName);
            return sprintf("(!isset(\$%s->%s) ? '%s' : null)", $modelVariable, $name, $value);
        }
        return 'null';
    }
346236
protected function createHidden($name, $value = null)
    {
        $field = Former::hidden($this->inputName($name))->class('input-'.$name);
        if ($value) {
            if (!is_scalar($value)) {
                $value = json_encode($value);
            }
            $field->forceValue($value);
        }

        return $field->render();
    }
1226649
public function set($name, $value=null, $locale=null, $hook=true, $change=true, $silentException=false) {
		if(is_string($name))
			$name = strtolower($name);

		#setting multiple properties at once
		if(is_array($name)) {
			$vars = $name;
			$locale = $value;
			foreach($vars as $name=>$value)
				$this->set($name, $value, $locale, $hook);
			return $this;
		}

		#setting a property multiple translations at once
		if(is_array($locale)) {
			foreach($locale as $one)
				$this->set($name, $value[$one], $one, $hook);
			return $this;
		}

		$this->getDefinition()->processPreSet($this, $name, $value, $locale, $hook, $silentException);

		if($this->getDefinition()->hasProperty($name)) {
			if(!$locale)
				$locale = $this->getLocale();

			if($this->getDefinition()->property($name)->get('i18n') && $locale !== $this->getLocale()) {
				if($locale == 'all') {
					foreach($value as $locale => $v) {
						if(isset($this->data['translations'][$locale][$name]) && $v === $this->data['translations'][$locale][$name])
							continue;
						$this->data['translations'][$locale][$name] = $v;
						if($change) {
							if(!isset($this->translationschanged[$locale]))
								$this->translationschanged[$locale] = [];
							$this->translationschanged[$locale][$name] = true;
						}
					}
				}
				else {
					if(isset($this->data['translations'][$locale][$name]) && $value === $this->data['translations'][$locale][$name])
						return $this;
					$this->data['translations'][$locale][$name] = $value;
					if($change) {
						if(!isset($this->translationschanged[$locale]))
							$this->translationschanged[$locale] = [];
						$this->translationschanged[$locale][$name] = true;
					}
				}
			}
			else {
				if(isset($this->data['properties'][$name]) && $value === $this->data['properties'][$name])
					return $this;
				$this->data['properties'][$name] = $value;
				if($change) {
					if($this->getDefinition()->property($name)->get('i18n'))
						$this->translationschanged[$this->getLocale()][$name] = true;
					else
						$this->changed[$name] = true;
				}
			}
		}
		elseif($name !== 'translations' && $name !== 'properties') {
			if(is_array($value)) {
				$coll = new ManyCollection($this, $name);
				$value = $coll->setAll($value);
			}
			$this->data[$name] = $value;
		}

		return $this;
	}
464906
public function push($name, $value = null)
    {
        switch ($name) {
        case 'name':
            $this->setName($value);
            break;
        case 'type':
            break;
        case 'value':
            $this->setValue($value, true);
            break;
        case 'required':
            $this->required = true;
            break;
        case 'pattern':
        case 'regex':
            $this->regex = $value;
            $this->attributes['pattern'] = $value;
            break;
        case 'minlength':
            $this->minlength = $value;
            $this->attributes['minlength'] = $value;
            break;
        case 'maxlength':
            $this->maxlength = $value;
            $this->attributes['maxlength'] = $value;
            break;
        case 'mapping':
            $this->mapping = $value;
            break;
        case 'prettyname':
            $this->prettyname = $value;
            break;
        case 'readonly':
            $this->readonly = true;
            $this->attributes['readonly'] = 'readonly';
            break;
        default:
            if (preg_match('#^([a-z0-9_-]+)$#mUsi', $name)) {
                if (null !== $value) {
                    $this->setAttribute($name, $value);
                } else {
                    $this->setAttribute($name, $name);
                }
            }
        }
    }
444950
protected function defaultValue(string $name, $value): Closure
    {
        return function (Table $table) use ($name, $value) {
            assert($table->hasColumn($name));
            $table->getColumn($name)->setDefault($value);
        };
    }
523443
public function make(string $name = null, string $value = null): \BearFramework\App\Response\Cookie
    {
        if ($this->newCookieCache === null) {
            $this->newCookieCache = new \BearFramework\App\Response\Cookie();
        }
        $object = clone($this->newCookieCache);
        if ($name !== null) {
            $object->name = $name;
        }
        if ($value !== null) {
            $object->value = $value;
        }
        return $object;
    }
359996
public static function delete( $name = '', $value = '' ) {

		if ( ! empty( $value ) ) {
			$GLOBALS['_DELETE'][ $name ] = $value;
		}

		if ( empty( $name ) ) {
			return ( isset( $GLOBALS['_DELETE'] ) ) ? $GLOBALS['_DELETE'] : NULL;
		} else {
			return ( isset( $GLOBALS['_DELETE'][ $name ] ) ) ? $GLOBALS['_DELETE'][ $name ] : NULL;
		}

	}
1165235
public function setContext($name, $value = null)
    {
        if (is_array($name)) {
            $this->context = $name + $this->context;
        } else {
            $this->context[$name] = $value;
        }
        return $this;
    }