Builds and prints Graph Image.
@access		public
@static
@param		array		$config			Configuration Data
@param		array		$data			Graph Data
@return		void
505218
public static function buildImage( $config, $data )
	{
		$graph	= self::buildGraph( $config, $data );
		$graph->stroke();
	}
175079
protected function createJsonResponse(array $data, array $config)
    {
        if (! \is_null($uses = $config['uses'] ?? null)) {
            $data = $data[$uses] ?? [];
        }

        if ($data instanceof Arrayable) {
            $data = $data->toArray();
        }

        $data = \array_map([$this, 'transformToArray'], $data);

        return function () use ($data, $config) {
            return \json_encode($data, $config['encoding'] ?? 0);
        };
    }
212565
public function manipulate(Config $config)
    {
        if ($this->isArrayAppend) {
            $this->appendToArraySetting($config);
        } else {
            $this->setSingleConfigValue($config);
        }
    }
1031210
public function setConfig( array $config )
	{
		if ( $config == $this->getConfig() ) { return; }

		$this->_values['config'] = $config;
		$this->setModified();
	}
75484
protected function writeCloudApiConfig(array $config) {
    if (!is_dir($this->cloudConfDir)) {
      mkdir($this->cloudConfDir);
    }
    file_put_contents($this->cloudConfFilePath, json_encode($config));
    $this->say("Credentials were written to {$this->cloudConfFilePath}.");
  }
300877
public static function start(&$config)
    {
        self::$config = &$config;
        self::$instance = new StandardDebugBar();
        self::$renderer = self::$instance->getJavascriptRenderer();
        self::$renderer->setOptions(self::$config);

        self::$atomikMessages = new \DebugBar\DataCollector\MessagesCollector('atomik');
        self::$instance['messages']->aggregate(self::$atomikMessages);

        Atomik::set('debugbar', self::$instance);
        Atomik::registerHelper('renderDebugBar', array(self::$renderer, 'render'));
        Atomik::registerHelper('renderDebugBarHead', array(self::$renderer, 'renderHead'));
    }
577135
protected function setParsedConfig(array $config)
    {
        foreach ($config as $key => $value) {
            $setter = 'set'.ucfirst($key);
            $this->$setter($value);
        }
    }
824166
public function initialize(array $config)
    {
        if (!$this->_config['key']) {
            $this->setConfig('key', Security::getSalt());
        }

        $controller = $this->_registry->getController();

        if ($controller === null) {
            $this->request = ServerRequestFactory::fromGlobals();
        }

        if (empty($this->_config['path'])) {
            $this->setConfig('path', $this->getController()->getRequest()->getAttribute('webroot'));
        }
    }
123254
private function __buildConfig(array $config)
    {
        foreach ($config as $key => $conf) {
            if ($key == 'driver') {
                $this->rawConfig['type'] = strtolower($conf);
                continue;
            }

            if (!array_key_exists($key, $this->rawConfig)) {
                $this->error->setMessage(sprintf(
                    "invalid config '%s', allowed config are: %s",
                    $key, implode(', ', array_keys($this->rawConfig))
                ));
                break;
            }

            $this->rawConfig[$key] = $conf;
        }

        if (!$this->error->hasError() && !$this->hasDriver($this->getType()) && !$this->preventNoLocalDriver) {
            $this->error->setMessage(sprintf(
                "Driver '%s' not available. Please choose one of: '%s'. ".
                'Or register new ConnectionString class by implements %s.',
                $this->getType(),
                implode("', '", $this->getAvailableDrivers()),
                ConnectionStringInterface::class
            ));
        }
    }
641332
protected function applyConfig(array $config) : void
    {
        $this->applyRules(ArrayHelper::get($config, 'rules', []));
        $this->applyRoles(ArrayHelper::get($config, 'roles', []));
        $this->applyPermissions(ArrayHelper::get($config, 'permissions', []));
    }
493024
private function init($config = array())
    {
        $this->getCore()->open($this->getFilename(), $config);
        if ($this->currentSheet !== null) {
            $this->getCore()->setSheet($this->currentSheet);
        }
    }
789711
public static function saveImage( $fileName, $config, $data, $invertOrder = FALSE )
	{
		$graph	= self::buildGraph( $config, $data, $invertOrder );
		$graph->stroke( $fileName );
	}
1189755
public function render(array $config = [])
    {
        $settings = AdminBar::$plugin->getSettings();
        $config['editEmbedded'] = $this->_editEmbedded;
        $entry = ($config['entry'] = $config['entry'] ?? null);
        $config['url'] = $config['url'] ?? '#';
        $config['id'] = $this->_editId;
        $config['enabled'] = AdminBar::$plugin->bar->canEmbed() ? true : false;

        // add config file settings to config
        $config['displayEditDate'] = $settings->displayEditDate;
        $config['displayEditAuthor'] = $settings->displayEditAuthor;
        $config['displayRevisionNote'] = $settings->displayRevisionNote;

        // figure out if $entry is a custom URL string, otherwise assume it's an Entry
        $config['type'] = $config['entry'] ? 'entry' : 'string';

        // get recent revision information
        $revision = $config['type'] == 'entry' ? Craft::$app->entryRevisions->getVersionsByEntryId($entry->id, $entry->siteId, 1, true) : null;
        if ($revision ?? false) {
            $revisionAuthor = Craft::$app->users->getUserById($revision[0]->creatorId);
            $config['revisionAuthor'] = $revisionAuthor;
            $config['revisionNote'] = $revision[0]->revisionNotes;
        } else {
            $config['revisionAuthor'] = null;
            $config['revisionNote'] = null;
        }

        // set title based on override, entry, or url provided
        if (!isset($config['title'])) {
            if ($config['type'] == 'entry') {
                $config['title'] = $config['entry']->title;
            } else {
                $config['title'] = $config['url'];
            }
        }

        $oldMode = Craft::$app->view->getTemplateMode();
        Craft::$app->view->setTemplateMode(View::TEMPLATE_MODE_CP);
        $html = Craft::$app->view->renderTemplate('admin-bar/editLinks', $config);
        Craft::$app->view->setTemplateMode($oldMode);

        print($html);

        $this->_editId += 1;
        $this->_editEmbedded = true;

        return '';
    }
658474
public function initialize(array $config)
    {
        parent::initialize($config);

        if (Plugin::getCollection()->has('Assets')) {
            $this->Asset = $this->getView()->loadHelper('Assets.Asset');
        } else {
            $this->Asset = clone $this->Html;
        }
    }
800842
protected function loadConfig(array $config)
	{
		$this->className = $config['class'];
		$this->itemPerPage = (int) $config['item_per_page'];
		$this->maxPageNumber = (int) $config['max_page_number'];		
	}
50115
public function loadConfig(array $config)
    {
        $this->devServerEnabled = $config['dev_server_enable'];
        $this->devServerHost = $config['dev_server_host'];
        $this->devServerPort = $config['dev_server_port'];
    }
434524
protected function checkConfig(array $config): void
    {
        foreach (['host', 'username', 'password', 'database', 'persistent'] as $key) {
            if (!isset($config[$key])) {
                $class = get_class($this);
                throw new ConfigException("Missing configuration key={$key} in {$class}");
            }
        }
    }