Call the given directive with the given value.

@param  string  $name
@param  string|null  $value
@return string
193011
protected function callCustomDirective($name, $value)
    {
        if (Str::startsWith($value, '(') && Str::endsWith($value, ')')) {
            $value = Str::substr($value, 1, -1);
        }

        return call_user_func($this->customDirectives[$name], trim($value));
    }
326442
public function data(string $name, $value = null)
    {
        if ($value === null) {
            return $this->getAttribute('data-' . $name);
        }

        return $this->setAttribute('data-' . $name, $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;
  }
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';
    }
517435
public function set($name, $value = null)
	{
		is_null($name) or \Arr::set($this->data, $name, $value);

		return $this;
	}
332844
public function combobox($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Combobox::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
941542
public static function get($name, $value = NULL)
    {
        return isset($_GET[$name]) ? $_GET[$name] : $value;
    }
551840
public function setAttribute($name, $value = null)
    {
        $this->getAttributes()->set($name, $value);
        return $this;
    }
166323
protected function old($name, $value = null)
    {
        if (empty($name)) {
            return;
        }

        // Convert array format (sth[1]) to dot notation (sth.1)
        $name = preg_replace('/\[(.+)\]/U', '.$1', $name);

        // If there's no default value provided, the html builder currently
        // has a model assigned and there aren't old input items,
        // try to retrieve a value from the model.
        if (empty($value) && $this->model && empty($this->request->old())) {
            $value = data_get($this->model, $name) ?? '';
        }

        return $this->request->old($name, $value);
    }
1093411
protected function renderAttribute($name, $value = null)
    {
        if ($value === null) {
            return $name;
        }

        if (is_array($value)) {
            $value = implode(' ', $value);
        }

        return vsprintf('%s="%s"', [
            $name,
            Html::escape((string) $value),
        ]);
    }
1217330
public function header($name, $value = null)
    {

        if ($value === null) {
            $this->headers[] = $name;
        } else {
            $this->headers[] = $this->headerString($name, $value);
        }

        return $this;
    }
653712
public function getDirective($name)
    {
        $name = strtolower(trim($name));
        return (isset($this->directives[$name]) ? $this->directives[$name] : null);
    }
704872
public function getDirective($name)
    {
        if (!$this->initialized) {
            $this->initialize();
        }

        return isset($this->directives[$name]) ? $this->directives[$name] : null;
    }
186824
public static function patch( $name = '', $value = '' ) {

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

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

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

            return true;
        }

        return null;
    }
40249
public function headerLine($name, $value)
    {
        if (stripos($name, 'X-') !== false) {
            return null;
        }

        return parent::headerLine($name, $value);
    }
430852
public function attr($name, $value = null)
    {
        $attrs = (array) $this->getAttribute('attribs');

        if ($value === null) {
            return isset($attrs[$name]) ? $attrs[$name] : null;
        }

        $attrs[$name] = $value;

        $this->setAttribute('attribs', $attrs);

        return $this;
    }