Gets or sets a block.

@param  string $name
@param  mixed  $value
@return string
974900
public function block($name, $value = null)
    {
        if ($value === null) {
            return isset($this->blocks[$name]) ? $this->blocks[$name] : null;
        }

        $this->blocks[$name] = $value;
    }
905075
public function set($name, $value)
    {
        $this->instance->unlock();
        $result = $this->instance->set($name, $value);
        $this->instance->lock();

        return $result;
    }
136065
public function container(string $name, $value=null)
  {
    # Getting or Setting the value?
    if (is_null($value)) {
      # Return what $name has stored in $container array
      $value = $this->container[$name] ?? null;

    } else {
      # Setting the container value $name to $value
      $this->container[$name] = $value;

    }

    return $value;
  }
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;
  }
1101604
public function _set($name, $value)
    {
        $setMethod = 'set' . ucfirst($name);
        if (method_exists($this, $setMethod)) {
            $this->$setMethod($value);
        } else {
            throw new \InvalidArgumentException(sprintf('Setter does not exist for "%s" property', $name));
        }
        return $this;
    }
1067969
public function getBlockByName($name) {
		foreach($this->blockManifest as $block) {
			if($block->getName() == $name) {
				return $block;
			}
		}
		return false;
	}
602967
protected function getBlock($name, array &$options)
    {
        $block = [];

        /** @noinspection ReferenceMismatchInspection */
        if (array_key_exists($name, $options)) {
            $block = $options[$name];
            unset($options[$name]);
        }

        return $block;
    }
852729
public function setHeaders($name, $value = null)
	{
		//Verifying if is array
		if (is_array($name)) {
			foreach ($name as $k => $v) {
				if (is_string($k)) {
					$this->setHeaders($k, $v);
				} else {
					$this->setHeaders($v, null);
				}
			}
		} else {
			// Verifying if is a string without $value parameter
			if (is_null($value) && (strpos($name, ':') > 0)) {
				list($name, $value) = explode(':', $name, 2);
			}
			
			if (is_null($value) || $value === false) {
				unset($this->headers[$name]);
			} else {
				if (is_string($value)) {
					$value = trim($value);
				}
				$this->headers[$name] = $value;
			}
		}
		
		return $this;
	}
520794
protected function set($name, $value)
    {
        if ($this->modified === null && $this->uid !== null) {
            $this->load();
        }

        $value = $this->validate($name, $value);

        if ($this->properties[$name]['value'] !== $value) {
            $this->properties[$name]['value'] = $value;
            $this->modified = true;
        }

        return $this;
    }
379082
public function withHeader($name, $value)
    {
        $request = clone $this;
        $request->headers->set($name, $value);

        return $request;
    }
404066
public function prepend($name, $value)
  {
    $v = $this->get($name);

    if (is_array($v)) {
      array_unshift($v, $value);

      return $this->set($name, $v);
    }

    return $this->set($name, $value . $this->get($name));
  }
220768
public function set($name, $value)
  {
    if (is_null($value)) {
      unset($this->vars[$name]);
    } else {
      $this->vars[$name] = $value;
    }

    return $this;
  }
1007949
public function set($name, $value)
    {
        if (property_exists($this, $name)) {
            $this->$name = $value;

            return true;
        }

        return null;
    }
310158
private function parseBlock($name,$content = '') {
        if(is_array($name)){
            $content = $name[2];
            $name    = $name[1];
        }
        $this->block[$name]  =   $content;
        return '';
    }
978123
public static function set(string $name, $value)
    {
        $names = Imi::parseDotRule($name);
        if (isset($names[0]))
        {
            $first = array_shift($names);
            if(isset(static::$configs[$first]))
            {
                return static::$configs[$first]->setVal($names, $value);
            }
            else
            {
                return false;
            }
        }
        else
        {
            return false;
        }
    }
5154
public function set($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $innerName => $innerValue) {
                $this->replace($innerName, $this->formatValue($innerValue));
            }
        } else {
            $this->replace($name, $this->formatValue($value));
        }

        // return is for chaining
        return $this;
    }
451267
public function getBlock($name)
    {
        return !empty($this->block[$name]) ? $this->block[$name] : null;
    }