@param null $variable
@param null $value

@return mixed
436438
public function setGlobalVariable($variable = NULL, $value = NULL)
	{
		try {

			$result = FALSE;

			if (is_null($variable))
				throw new Exception("Global variable name not provided or is null", 503);

			if (is_null($value))
				throw new Exception("Global variable value not provided or is null", 503);

			$uri = "/asterisk/variable";
			$postData = array("variable" => $variable, "value" => $value);

			$this->ariEndpointOptions['json'] = $postData;
			$result = json_decode($this->ariEndpointClient->post($this->ariEndpointURL . $uri, $this->ariEndpointOptions)->getBody()->getContents());

			return $result;

		} catch (\GuzzleHttp\Exception\RequestException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (\GuzzleHttp\Exception\ClientException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (\GuzzleHttp\Exception\ServerException $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();
			return (int)$e->getCode();
		} catch (Exception $e) {
			$this->phpariObject->lasterror = $e->getMessage();
			$this->phpariObject->lasttrace = $e->getTraceAsString();

			return FALSE;
		}
	}
1021201
public function onChange($value = null)
    {
        if (func_num_args()) {
            $this->onChange = $value;
            return $this;
        }
        return $this->onChange;
    }
144453
public function layout($value = null)
    {
        if (null === $value)
            return $this->layout;
        else
            $this->layout = $value;
    }
1229203
public function syntax(Syntax $value = null) : Syntax
    {
        if (null === $value) {
            return $this->syntax;
        }
        $this->syntax = $value;
        return $this;
    }
336687
public static function getString(&$var, $values = null)
    {
        if (!is_string($var)) {
            $var = '';
        }
        if ($values !== null) {
            return in_array($var, $values, true) ? $var : $values[0];
        }

        return $var;
    }
302861
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return Arr::get($this->options, $option);
        }

        $this->options[$option] = $value;

        return $this;
    }
582268
public function get($variable = null, $default = '', $validator = null)
    {
        $value = $this->returnLocalParam('getParams', $variable, $default);

        return $value;
    }
549793
public static function fromValue($value)
    {
        try {
            return array_search(strtoupper($value), $this->modeList);
        } catch (Exception $e) {
            return null;
        }
    }
565493
public function output($value = null)
    {
        return Cuztom::view('fields/'.$this->view, [
            'tabs'  => $this,
            'value' => $value,
            'type'  => $this->type,
        ]);
    }
287140
public function get($variable, $htmlEncode = true)
    {
        $value = null;

        if ( isset($this->variables[$variable]) ) {
            $value = $this->variables[$variable][$htmlEncode ? 'safe' : 'unsafe'];
        }

        return $value;
    }
873103
public function nullIfEmpty($value, $key = null)
    {
        if (! is_null($key)) {
            $value = $this->fetchValueForKey($key, $value);
        }

        if (is_array($value)) {
            return $this->nullIfEmptyArray($key, $value);
        }

        if (is_bool($value)) {
            return $value;
        }

        return trim($value) === '' ? null : $value;
    }
43589
public function OrderBy($Value = NULL) {
      if ($Value === NULL)
         return $this->_OrderBy;

      if (is_string($Value))
         $Value = array($Value);

      if (is_array($Value)) {
         // Set the order of this object.
         $OrderBy = array();

         foreach($Value as $Part) {
            if (StringEndsWith($Part, ' desc', TRUE))
               $OrderBy[] = array(substr($Part, 0, -5), 'desc');
            elseif (StringEndsWith($Part, ' asc', TRUE))
               $OrderBy[] = array(substr($Part, 0, -4), 'asc');
            else
               $OrderBy[] = array($Part, 'asc');
         }
         $this->_OrderBy = $OrderBy;
      } elseif (is_a($Value, 'Gdn_SQLDriver')) {
         // Set the order of the given sql.
         foreach ($this->_OrderBy as $Parts) {
            $Value->OrderBy($Parts[0], $Parts[1]);
         }
      }
   }
328263
public static function Controller($Value = NULL) {
      static $Controller = NULL;

      if ($Value !== NULL)
         $Controller = $Value;

      return $Controller;
   }
534337
protected function checkValue($value, $key = null)
    {
        if ($value != null) {
            if ($key !== null) {
                return isset($value[$key]) ? $value[$key] : null;
            }

            return $value;
        }
    }
556182
public function value($value = null)
    {
        if ($value !== null) {
            $this->value = $value;
        }

        return (string) $this->value;
    }
1193983
public function result($name = null, $value = null)
    {
        if ($name === null) {
            return $this->result;
        }
        if (array_key_exists($name, $this->result)) {
            if ($value === null) {
                return $this->result[$name];
            }
            $this->result[$name] = $value;
        }
    }
447018
public function setValue($value = null)
    {
        if (is_callable($value)) {
            $value = call_user_func($value);
        }

        $value = $this->handleJsonType($value);

        $this->value = $value;

        return $this;
    }