Set debug parameters
@param array  $data Params for debug, see self::$_config vars
@param string $section
@return JBDump
424990
public function setParams($data, $section = null)
    {
        if ($section) {
            $newData = array($section => $data);
            $data    = $newData;
            unset($newData);
        }

        if (isset($data['errors']['reporting'])) {
            $this->showErrors($data['errors']['reporting']);
        }

        // set root directory
        if (!isset($data['root']) && !self::$_config['root']) {
            $data['root'] = $_SERVER['DOCUMENT_ROOT'];
        }

        // set log path
        if (isset($data['log']['path']) && $data['log']['path']) {
            $this->_logPath = $data['log']['path'];

        } elseif (!self::$_config['log']['path'] || !$this->_logPath) {
            $this->_logPath = dirname(__FILE__) . self::DS . 'logs';
        }

        // set log filename
        $logFile = 'jbdump';
        if (isset($data['log']['file']) && $data['log']['file']) {
            $logFile = $data['log']['file'];

        } elseif (!self::$_config['log']['file'] || !$this->_logfile) {
            $logFile = 'jbdump';
        }

        $this->_logfile = $this->_logPath . self::DS . $logFile . '_' . date('Y.m.d') . '.log.php';

        // merge new params with of config
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $keyInner => $valueInner) {
                    if (!isset(self::$_config[$key])) {
                        self::$_config[$key] = array();
                    }
                    self::$_config[$key][$keyInner] = $valueInner;
                }
            } else {
                self::$_config[$key] = $value;
            }
        }

        return $this;
    }
1293393
public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
911039
public function setData($data = [])
    {
        if (!is_array($data) && is_string($data)) {
            $data = parse_str($data);
        }
        if (count($data) == 0) {
            $this->data = [];
        } else {
            $this->data = $data;
        }
        $this->debug->debug(__FUNCTION__, 'Data into Request: ', $this->data);
    }
467991
public function setData($data)
	{
		if( is_null($data) )
		{
			$data = [];
		}

		if( $data instanceof stdClass )
		{
			$data = [$data];
		}

		if( is_array($data) )
		{
			$data = $this->checkItems($data);
			$this->data = $data;
		}

		$this->data = (array) $data;

		if(empty($this->type) && ! empty($this->data[0]))
		{
			$this->type = $this->data[0]->getType();
		}
	}
1022160
public function setData(array $data, $replaceTemplateVariables = true) : self
    {
        $this->assertDataIsWritable();

        if ($replaceTemplateVariables) {
            $data = $this->replaceTemplateVariables($data);
        }

        $this->_data = $data;

        return $this;
    }
113935
public function addDebug($value)
    {
        if (!$this->isDebug()) {
            return $this;
        }

        return $this->addData(
            self::P_DEBUG,
            is_array($value) ? json_encode($value) : $value
        );
    }
1240490
public function set_debug($dbg = true)
    {
        $this->options['debug'] = $dbg;
        $this->conn->setDebug($dbg, array($this, 'debug_handler'));
    }
761824
public function debug($msg, $data = NULL) {
        if (!$this->isAllowToLog(static::LOG_LEVEL_DEBUG)) {
            return;
        }

        $this->log('debug', $msg, $data);
    }
676537
public function setData(array $data)
    {
        parent::setData($data);

        /** @deprecated */
        if (isset($data['string'])) {
            trigger_error(
                sprintf(
                    'Sort expression option "string" is deprecated in favour of "condition": %s',
                    $data['string']
                ),
                E_USER_DEPRECATED
            );
            $this->setCondition($data['string']);
        }

        /** @deprecated */
        if (isset($data['table_name'])) {
            trigger_error(
                sprintf(
                    'Sort expression option "table_name" is deprecated in favour of "table": %s',
                    $data['table_name']
                ),
                E_USER_DEPRECATED
            );
            $this->setTable($data['table_name']);
        }

        if (isset($data['table'])) {
            $this->setTable($data['table']);
        }

        if (isset($data['property'])) {
            $this->setProperty($data['property']);
        }

        if (isset($data['direction'])) {
            $this->setDirection($data['direction']);
        }

        if (isset($data['mode'])) {
            $this->setMode($data['mode']);
        }

        if (isset($data['values'])) {
            $this->setValues($data['values']);

            if (!isset($data['mode'])) {
                $this->setMode(self::MODE_VALUES);
            }
        }

        if (isset($data['condition']) || isset($data['string'])) {
            if (!isset($data['mode'])) {
                $this->setMode(self::MODE_CUSTOM);
            }
        }

        return $this;
    }
697392
function set_debug($dbg = true)
    {
        $this->debug = $dbg;

        if ($this->ldap) {
            $this->ldap->config_set('debug', $dbg);
        }
    }
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
101405
public function addSection( $section )
	{
		if ( !( isset( $this->data[$section] ) && is_array( $this->data[$section] ) ) )
			$this->data[$section]	= array();
		$this->currentSection	= $section;
	}
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;
    }
1034008
public static function debug($data, array $options = [])
    {
        $options = array_merge([
            'trace_offset' => 0,
        ], $options);

        self::output(self::getDebugInformation($data), $options);
    }
581955
public function setConfigValue( $section, $key, $value )
	{
		$this->config[$section][$key] = $value;
		$this->write();
	}
113380
public function setContents($data)
    {
        if (!is_array($data))
        {
            throw new InvalidDataException('Invalid section contents! ' .
                                           'Section contents must be an array.');
        }
        $this->contents = IniParser::i()->itemValuetoStringRepresentation($data);

        return $this;
    }
360402
public function setSection($section)
    {
        $this->section = $section;
        if($section) {
        	$section->getSectionConfig()->setPage($this);
        }

        return $this;
    }