Dump var to console.log

@param mixed $vars,... Any var

@return PheryResponse
767603
public function dump_vars($vars)
    {
        $this->last_selector = null;
        $args = array();
        foreach (func_get_args() as $index => $func) {
            if ($func instanceof PheryResponse || $func instanceof PheryFunction) {
                $args[$index] = array($this->typecast($func, true, true));
            } elseif (is_object($func)) {
                $args[$index] = array(get_object_vars($func));
            } else {
                $args[$index] = array($func);
            }
        }

        return $this->cmd(6, $args);
    }
1087464
public function processTemplate($template, $vars = [])
    {
        // override the twig header vars for local resolution
        $this->grav->fireEvent('onTwigTemplateVariables');
        $vars += $this->twig_vars;

        try {
            $output = $this->twig->render($template, $vars);
        } catch (\Twig_Error_Loader $e) {
            throw new \RuntimeException($e->getRawMessage(), 404, $e);
        }

        return $output;

    }
604320
protected function apiGetCall($vars)
    {
        $this->cache = new Cache($this->config);
        if (!empty($this->cache->error)) {
            throw new CacheException($this->cache->error);
        } else {
            if ($cache = $this->cache->get($vars)) {
                // Cache exists
                $this->response = $cache;
                return $this->processResponse();
            } else {
                // Cache doesnt exist
                $this->setup();
                if ($this->connected == 1) {
                    $url = '/2.0/?';
                    foreach ($vars as $name => $value) {
                        $url .= trim(urlencode($name)) . '=' . trim(urlencode($value)) . '&';
                    }
                    $url = substr($url, 0, -1);
                    $url = str_replace(' ', '%20', $url);

                    $out = "GET " . $url . " HTTP/1.0\r\n";
                    $out .= "Host: " . $this->host . "\r\n";
                    $out .= "\r\n";
                    $this->response = $this->socket->send($out, 'array');
                    $processedResponse = $this->processResponse();
                    $this->cache->set($vars, $this->response);
                    
                    return $processedResponse;
                }
            }
        }
    }
1036128
private function BindExpr( $vars )
	{
		/**
		 * @var XPath2RunningContext $runningContext
		 */
		$runningContext = new XPath2RunningContext();

		/**
		 * @var ReferenceLink[] $variables
		 */
		$variables = null;
		$variableValues = null;
		if ( ! is_null( $vars ) && ! empty( $vars ) )
		{
			/**
			 * @var array[ReferenceLink] $variables
			 */
			$variables = array(); // new ReferenceLink[$vars.Count];
			$variableValues = array(); // new object[$vars.Count];
			// $array = $vars; // new KeyValuePair<QName, object>[$vars.Count];
			$array = array();
			foreach ( $vars as $key => $value )
			{
				$variables[] = $runningContext->NameBinder->PushVar( $key );
				$variableValues[] = $value;
			}
		}

		$this->context->RunningContext = $runningContext;
		$this->context->availableCollections = isset( $vars['availableCollections'] ) ? $vars['availableCollections'] : array();
		$this->context->defaultCollection = isset( $vars['defaultCollection'] ) ? $vars['defaultCollection'] : null;

		$this->exprTree->Bind();

		/**
		 * @var object[] $datapool
		 */
		$dataPool = array(); // new object[ $runningContext->NameBinder->getLength() ];
		if ( ! is_null( $variables ) )
		{
			for ( $k = 0; $k < count( $variables ); $k++ )
			{
				$variables[ $k ]->Set( $dataPool, $this->PrepareValue( $variableValues[ $k ] ) );
			}
		}
		return $dataPool;
	}
1206886
public function render($vars = array())
    {
        // inject front matter options into template
        $vars = array_merge_recursive($vars, $this->getParams());

        // inject providers content
        if ($providers = $this->getParam('page.providers', false)) {
            $factory = new ProviderFactory();
            foreach ($providers as $varname => $data) {
                if (!isset($data['provider'])) {
                    continue;
                }
                $provider = $factory->create($data['provider'], $data);
                $provider->setProjectPath($this->getInputRootDir());
                $providedContent = $provider->get();
                $vars['page']['providers'][$varname] = $providedContent;
                $vars['this']['providers'][$varname] = $providedContent;
            }

        }

        // convert view into static representation
        $view = $this->getTemplate();
        foreach ($this->getProcessors() as $processor) {
            $view = $processor->render($view, $vars);
        }

        return $view;
    }
1119135
public function setVars($vars)
    {
        $context = $this->_context;

        $context->vars = array_merge($context->vars, $vars);

        return $this;
    }
162302
public function returnFormField($vars)
    {
        extract($vars);
        $ret = '';
        if (isset($mask)) $ret .= '{' . $mask . '}';
        if (isset($preHtml)) { $ret .= $preHtml; }
        if (isset($html)) {
            $ret .= $html;
        } elseif (isset($items)) {
            foreach ($items as $i) {
                $ret .= $this->returnFormField($i);
            }
        } elseif (isset($component)) {
            $view = new Kwf_Component_Renderer();
            $ret .= $view->renderComponent($component);
        }
        if (isset($postHtml)) { $ret .= $postHtml; }
        if (isset($mask)) $ret .= '{/' . $mask . '}';
        return $ret;
    }
148696
function varIsArray($var)
		{
			$var_ser = serialize($var);
			array_push($this->arrHistory, $var_ser);

			$this->makeTableHeader("array","array");
			if(Arrays::isArray($var)) {
				foreach($var as $key => $value) {
					$this->makeTDHeader("array", $key);

					//check for recursion
					if(Arrays::isArray($value)) {
						$var_ser = serialize($value);
						if(Arrays::inArray($var_ser, $this->arrHistory, TRUE))
							$value = "*RECURSION*";
					}

					if(Arrays::inArray(gettype($value), $this->arrType)) {
						$this->checkType($value);
					} else {
						$value = (trim($value)=="") ? "[empty string]" : $value;
						echo $value;
					}
					echo $this->closeTDRow();
				}
			} else {
				echo "<tr><td>" . $this->error("array") . $this->closeTDRow();
			}
			array_pop($this->arrHistory);
			echo "</table><hr class=thinDebugHr />";
		}
1305238
public static function dump($var, $echo = true, $label = null, $flags = ENT_SUBSTITUTE)
    {
        $label = (null === $label) ? '' : rtrim($label) . ':';
        ob_start();
        var_dump($var);
        $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', ob_get_clean());
        if (IS_CLI) {
            $output = PHP_EOL . $label . $output . PHP_EOL;
        } else {
            if (!extension_loaded('xdebug')) {
                $output = htmlspecialchars($output, $flags);
            }
            $output = '<pre>' . $label . $output . '</pre>';
        }
        if ($echo) {
            echo($output);
            return;
        }
        return $output;
    }
90654
public function post($path, $vars = array()) {
    $request = $this->request();
    $request = $this->prepareRequest($request);

    $response = $request->post($this->endpoint . $path, $vars);
    return $this->handleResponse($response);
  }
1080023
public function dump(/*$var1 [, $var2...$varN]*/)
    {
        $this->initializeApplication();

        if ($this->application->container->getParameter('silenced', false)) {
            return null;
        }

        $this->initializeNodes();

        $args = func_get_args();
        $this->readVariables($args);
        $this->loadCallLocationInfo();

        $render = $this->getRender();
        $render->setGlobals(array(
            'id' => uniqid(),
            'expanded' => $this->application->container->getParameter('expanded'),
            'theme' => $render->getTheme()->getName()
        ));

        return $render->render($this->nodes, array(
            'callFile' => $this->callFile,
            'callLine' => $this->callLine,
            'xdebugLink' => $this->xdebugLink
        ));
    }
732920
public function dump(...$args)
    {
        $values = $this->handleValues($args);

        $data = (new VarCloner())->cloneVar($values);

        if ($this->connection->write($data) === false) {
            dump($values);
        }
    }
442009
public static function setDebugHeaders(array $vars)
    {
        if (Config::getParam('debug', true) && !self::isTest()) {
            Logger::log('Adding debug headers to render response');
            $vars["__DEBUG__"]["includes"] = get_included_files();
            $vars["__DEBUG__"]["trace"] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
            header('X-PSFS-DEBUG-TS: ' . Dispatcher::getInstance()->getTs() . ' s');
            header('X-PSFS-DEBUG-MEM: ' . Dispatcher::getInstance()->getMem('MBytes') . ' MBytes');
            header('X-PSFS-DEBUG-FILES: ' . count(get_included_files()) . ' files opened');
        }

        return $vars;
    }
477516
function varIsArray($var) {
		$var_ser = serialize($var);
		array_push($this->arrHistory, $var_ser);

		$this->makeTableHeader("array","array");
		if(is_array($var)) {
			foreach($var as $key=>$value) {
				$this->makeTDHeader("array",$key);

				//check for recursion
				if(is_array($value)) {
					$var_ser = serialize($value);
					if(in_array($var_ser, $this->arrHistory, TRUE))
						$value = "*RECURSION*";
				}

				if(in_array(gettype($value),$this->arrType))
					$this->checkType($value);
				else {
					$value=(trim($value)=="") ? "[empty string]" : $value;
					echo $value;
				}
				echo $this->closeTDRow();
			}
		}
		else echo "<tr><td>".$this->error("array").$this->closeTDRow();
		array_pop($this->arrHistory);
		echo "</table>";
	}
569664
public function populate(array $vars)
	{
		foreach ($vars as $key => $value)
		{
			if (false === getenv($key))
			{
				$_ENV[$key] = $value;
				$_SERVER[$key] = $value;
				putenv("{$key}={$value}");
			}
		}
	}
527736
public function render(array $vars = array())
    {
        $templateFile = $this->getTemplateRouter()->findTemplateFile($this->getRequest());
        if ($templateFile) {
            return $this->getAppController()->render($templateFile, $vars);
        }
        return $this->getAppController()->error404();
    }
1033950
protected function render(string $template, array $vars = [])
    {
        $vars['flash'] = $this->flash;
        $this->view->setVars($vars);

        $content = $this->view->render($template);
        $this->response->setContent($content);

        return $this->response;
    }