Get or Set a Container value.

@param      string      $name   Dependency name
@param      mixed|null  $value  Value to SET. if Omitted, then $name is
returned (if found)

@return     mixed|null
423930
public function container(string $name, $value=null)
  {
    # Getting or Setting the value?
    if (\is_null($value)) {
      # Return what $name has stored in $container array
      if ($this->getContainer()->has($name)) {
        $value = $this->getContainer()->get($name);
      } else {
        $value = null;
      }

    } elseif (\is_callable($value)) {
      # Callable
      $this->getContainer()->share($name,$value);

    } else {
      # Variable
      $this->getContainer()->share($name,$value);

    }

    return $value;
  }
110576
public function set($name, $value)
	{
		if (is_string($value) && class_exists($value)) {
			return $this->container->bind($name, $value);
		}

		return $this->container->set($name, $value);
	}
776050
public function config($name, $value = null)
    {
        if (func_num_args() === 1) {
            return $this["config"]->get($name);
        }

        return $this["config"]->set($name, $value);
    }
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];
        }
    }
1039112
public function getProperty($name, $value = null)
    {
        if (!isset($this->properties[$name])) {
            $this->properties[$name] = new VariableProperty($this, $name, $value);
        }

        return $this->properties[$name];
    }
972610
public function get($name)
    {
        $this->initialize();

        if (!isset($this->parameters[$name]) && !array_key_exists($name, $this->parameters)) {
            if ($this->container) {
                return $this->container->getParameter($name);
            }

            return null;
        }

        return $this->parameters[$name];
    }
557712
public function getValue(string $name): ?string
    {
        if (isset($this->data[$name])) {
            return $this->data[$name]->value;
        }
        return null;
    }
748999
public function setSingleton($name, $value)
	{
		if (is_string($value) && class_exists($value)) {
			return $this->container->bindSingleton($name, $value);
		}

		return $this->container->singleton($name, $value);
	}
965334
public function set($name, $value = null)
    {
        $this->loaded = true;

        // Set record for collection
        if (!$this->data && $value instanceof static) {
            $this->isColl = true;
        }

        if (!$this->isColl) {
            if (in_array($name, $this->getFields())) {
                $this->changedData[$name] = isset($this->data[$name]) ? $this->data[$name] : null;
                $this->data[$name] = $value;
                $this->isChanged = true;
            }
        } else {
            if (!$value instanceof static) {
                throw new \InvalidArgumentException('Value for collection must be an instance of Wei\Record');
            } else {
                // Support $coll[] = $value;
                if ($name === null) {
                    $this->data[] = $value;
                } else {
                    $this->data[$name] = $value;
                }
            }
        }
        return $this;
    }
1209819
public function getPropertyValue(string $name) {
		if (isset($this->dispatchables[$name])) {
			return $this->dispatchables[$name];
		}
		
		return null;
	}
178176
private function findValue(string $name)
    {
        $source = $this->source;

        $path = explode('.', $name);
        foreach ($path as $step) {
            if ($source instanceof EntityInterface) {
                if (!$source->hasField($step)) {
                    return null;
                }

                //Sub entity or field
                $source = $source->getField($step);
                continue;
            }

            if ($source instanceof AccessorInterface) {
                $source = $source->packValue();
                continue;
            }

            if (is_array($source) && array_key_exists($step, $source)) {
                $source = &$source[$step];
                continue;
            }

            //Unable to resolve value, an exception required here
            return null;
        }

        return $source;
    }
381369
public function getContainer($name)
    {
        $container = $this->containers->get($name);

        if (empty($container)) {
            return null;
        }

        return $container;
    }
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];
    }
1151512
public function setAttr($name, $value = null)
    {
        $wrapper = $this->getWrapper();
        
        // set attribute.
        $wrapper[$name] = $value;

        return $this->setWrapper($wrapper);
    }
1244947
public static function getLevelValue($name)
    {
        $name = strtoupper($name);
        $map = (new \ReflectionClass(self::class))->getConstants();

        return (isset($map[$name]))? $map[$name] : null;
    }
551889
public function holder($name = null, $value = null) {
        if ($name === null && $value === null) {
            return $this->holders[ 'default' ];
        }
        if ($value === null) {
            $value = $name;
            $name = 'default';
        }
        $this->holders[ $name ] = $value;
        return null;
    }
1190898
public function get($name, $default = null)
    {
        if (isset($this->container[$name])) {
            return $this->container[$name];
        }

        return $default;
    }