- Change reference and remove old rerence
@param stdClass $variable Content variables for execute functionality
@return null
519287
public function registerReference(stdClass $variable) {
    (new RegisterReference())->render($this->pdo, $this->info, $variable, $this->output);
  }
95614
public function lastModified($var = null)
    {
        if ($var !== null) {
            $this->last_modified = $var;
        }
        if (!isset($this->last_modified)) {
            $this->last_modified = (bool)Grav::instance()['config']->get('system.pages.last_modified');
        }

        return $this->last_modified;
    }
327185
protected function evalObjDesc($variable)
    {
        $output = [];
        if ($variable instanceof ComponentBase) {
            $details = $variable->componentDetails();
            $output[] = '<abbr title="'.array_get($details, 'description').'">';
            $output[] = array_get($details, 'name');
            $output[] = '</abbr>';
        }

        return implode('', $output);
    }
1140174
public function setVariable(Variable $variable)
    {
        $this->checkType($variable);
        $data = &$this->getDataPlaceHolder();
        $data[$variable->getIdentifier()] = $variable;
    }
928178
public function remove($var=null)
    {
        if (empty($var)) {
            return $this->destroy(session_id());
        }

        $this->unsets[] = $var;

        if (isset($_SESSION[$var])) {
            unset($_SESSION[$var]);
        }
        else {
            $path = explode('.', $var);
            $key = array_pop($path);
            $node = &$this->get_node($path, $_SESSION);
            unset($node[$key]);
        }

        return true;
    }
359712
public function table(stdClass $variable) {
    (new Table())->render($this->pdo, $this->info, $variable, $this->output);
  }
1066168
public function bind($variable, $callback = null)
    {
        $name = 'bind.'.$variable;

        // If callback pass, so put in a queue.
        if (! empty($callback)) {
            // Preparing callback in to queues.
            $this->events->listen($name, function() use ($callback, $variable) {
                return ($callback instanceof Closure) ? $callback() : $callback;
            });
        }

        // Passing variable to closure.
        $_events   =& $this->events;
        $_bindings =& $this->bindings;

        // Buffer processes to save request.
        return array_get($this->bindings, $name, function() use (&$_events, &$_bindings, $name) {
            $response = current($_events->fire($name));
            array_set($_bindings, $name, $response);
            return $response;
        });
    }
1215520
protected function evalVarDesc($variable, $key)
    {
        $type = $this->getType($variable);

        if ($type == 'method') {
            return $this->evalMethodDesc($variable);
        }

        if (isset($this->commentMap[$key])) {
            return $this->commentMap[$key];
        }

        if ($type == 'array') {
            return $this->evalArrDesc($variable);
        }

        if ($type == 'object') {
            return $this->evalObjDesc($variable);
        }

        return '';
    }
1249973
public function get($variable)
    {
        if (false === array_key_exists($variable, $this->variables)) {
            throw new View\Exception(sprintf('Unassigned variable "%s"', $variable));
        }

        return $this->variables[$variable];
    }
1159638
public function setRemovedTargetIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->removed_target_ids = $arr;

        return $this;
    }
527409
protected function evalVarDump($variable)
    {
        $dumper = new HtmlDumper;
        $cloner = new VarCloner;

        $output = '<div style="display:none">';
        $output .= $dumper->dump($cloner->cloneVar($variable), true);
        $output .= '</div>';

        return $output;
    }
1039256
public static function debug($variable)
    {
        ob_start();
        var_dump($variable);
        $output = ob_get_clean();
        $maps = ['string' => "/(string\((?P<length>\d+)\)) (?P<value>\"(?<!\\\).*\")/i", 'array' => "/\[\"(?P<key>.+)\"(?:\:\"(?P<class>[a-z0-9_\\\]+)\")?(?:\:(?P<scope>public|protected|private))?\]=>/Ui", 'countable' => "/(?P<type>array|int|string)\((?P<count>\d+)\)/", 'resource' => "/resource\((?P<count>\d+)\) of type \((?P<class>[a-z0-9_\\\]+)\)/", 'bool' => "/bool\((?P<value>true|false)\)/", 'float' => "/float\((?P<value>[0-9\.]+)\)/", 'object' => "/object\((?P<class>\S+)\)\#(?P<id>\d+) \((?P<count>\d+)\)/i"];
        foreach ($maps as $function => $pattern) {
            $output = preg_replace_callback($pattern, function ($matches) use ($function) {
                switch ($function) {
                    case 'string':
                        $matches['value'] = htmlspecialchars($matches['value']);

                        return '<span style="color: #0000FF;">string</span>(<span style="color: #1287DB;">'.$matches['length'].')</span> <span style="color: #6B6E6E;">'.$matches['value'].'</span>';

                    case 'array':
                        $key = '<span style="color: #008000;">"'.$matches['key'].'"</span>';
                        $class = '';
                        $scope = '';
                        if (isset($matches['class']) && !empty($matches['class'])) {
                            $class = ':<span style="color: #4D5D94;">"'.$matches['class'].'"</span>';
                        }
                        if (isset($matches['scope']) && !empty($matches['scope'])) {
                            $scope = ':<span style="color: #666666;">'.$matches['scope'].'</span>';
                        }

                        return '['.$key.$class.$scope.']=>';

                    case 'countable':
                        $type = '<span style="color: #0000FF;">'.$matches['type'].'</span>';
                        $count = '(<span style="color: #1287DB;">'.$matches['count'].'</span>)';

                        return $type.$count;

                    case 'bool':
                        return '<span style="color: #0000FF;">bool</span>(<span style="color: #0000FF;">'.$matches['value'].'</span>)';

                    case 'float':
                        return '<span style="color: #0000FF;">float</span>(<span style="color: #1287DB;">'.$matches['value'].'</span>)';

                    case 'resource':
                        return '<span style="color: #0000FF;">resource</span>(<span style="color: #1287DB;">'.$matches['count'].'</span>) of type (<span style="color: #4D5D94;">'.$matches['class'].'</span>)';

                    case 'object':
                        return '<span style="color: #0000FF;">object</span>(<span style="color: #4D5D94;">'.$matches['class'].'</span>)#'.$matches['id'].' (<span style="color: #1287DB;">'.$matches['count'].'</span>)';

                }
            }, $output);
        }
        $header = '';
        list($debugfile) = debug_backtrace();

        if (!empty($debugfile['file'])) {
            $header = '<h4 style="border-bottom:1px solid #bbb;font-weight:bold;margin:0 0 10px 0;padding:3px 0 10px 0">'.$debugfile['file'].'</h4>';
        }

        echo '<pre style="background-color: #CDDCF4;border: 1px solid #bbb;border-radius: 4px;-moz-border-radius:4px;-webkit-border-radius\:4px;font-size:12px;line-height:1.4em;margin:30px;padding:7px">'.$header.$output.'</pre>';
    }
1240995
protected function _removeSubcontent($var)
    {
        if ($this->acceptSubcontent($var)) {
            foreach ($this->_data[$var] as $type => $value) {
                if (is_array($value)) {
                    $keys = array_keys($value);
                    $values = array_values($value);

                    $type = end($keys);
                    $value = end($values);
                }

                foreach ($this->_subcontent as $subcontent) {
                    if ($subcontent->getUid() === $value) {
                        $this->_subcontent->removeElement($subcontent);
                        break;
                    }
                }
            }

            $this->updateSubcontentMap();
        }
    }
382591
public static function remove($variable) {
		self::startSessionIfNeeded();
		// If it exists, and we do not want to overwrite, then throw exception
		if (! self::has($variable)) {
			throw new \Exception("{$variable} does not exist in the store.");
		}

		// Unset the variable
		unset($_SESSION[$variable]);

		// Was it removed
		return ! self::has($variable);
	}
1132062
public function addVariable(Variable $variable) {
        $variables = $this->getVariables();
        $key = $variable->getName();
        if(array_key_exists($key, $variables)) {
            throw new \Exception('A Variable with the name of: ' . $variable->getName() . ' already exists');
        }
        $variables[$key] = $variable;
        ksort($variables);
        $this->setVariables($variables);
    }
558355
public function setTableReference($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BigQueryTable::class);
        $this->table_reference = $var;

        return $this;
    }
338799
protected function deregisterObject(&$var)
    {
        if (!($this->objectRegistry instanceof SplObjectStorage) || !is_object($var)) {
            return $this;
        }

        $this->objectRegistry->detach($var);

        return $this;
    }