Add the default suite of context providers provided.

@return  void
496861
protected function _addDefaultContextProviders()
    {
        $this->addContextProvider('orm', function ($request, $data) {
            if (is_array($data['entity']) || $data['entity'] instanceof \Traversable) {
                $pass = (new Collection($data['entity']))->first() !== null;
                if ($pass) {
                    return new EntityContext($request, $data);
                }
            }

            return $this->_addEntityContent($request, $data);
        });

        $this->_addFormContextProvider();
        $this->_addFormArrayProvider();
    }
531486
protected function apply_defaults() {
        $this->log('applying restore defaults', backup::LOG_DEBUG);
        restore_controller_dbops::apply_config_defaults($this);
        $this->set_status(backup::STATUS_CONFIGURED);
    }
597020
protected function configure(): void
    {
        $this->setName('dependency-guard');
        $this->setDescription(
            'Check Composer dependencies for a --no-dev install.'
        );

        $this->addOption(
            'format',
            'f',
            InputOption::VALUE_REQUIRED,
            'The output format. '
                . implode(
                    ', ',
                    array_map(
                        function (string $format) : string {
                            return sprintf('<comment>%s</comment>', $format);
                        },
                        $this->exporterFactory->getOutputFormats()
                    )
                ),
            ViolationExporterFactoryInterface::DEFAULT_FORMAT
        );
    }
552906
public function setUpDispatcherDefaults()
    {
        // Set the defaults for the dispatcher
        $this->dispatcher->setDefaultTask('Danzabar\CLI\Tasks\Utility\Help');
        $this->dispatcher->setDefaultAction('main');

        // Set no suffixes
        $this->dispatcher->setTaskSuffix('');
        $this->dispatcher->setActionSuffix('');
    }
241407
protected function setupDefaults()
    {
        $this->addHandler('select', new SelectQueryHandler());
        $this->addHandler('search', new SearchQueryHandler());
        $this->addHandler('random', new RandomQueryHandler());
        $this->addHandler('first', new FirstQueryHandler());
        $this->addHandler('latest', new LatestQueryHandler());
        $this->addHandler('nativesearch', new NativeSearchHandler());
        $this->addHandler('namedselect', new IdentifiedSelectHandler());

        $this->addDirectiveHandler('getquery', new GetQueryDirective());
        $this->addDirectiveHandler('hydrate', new HydrateDirective());
        $this->addDirectiveHandler('limit', new LimitDirective());
        $this->addDirectiveHandler('order', new OrderDirective());
        $this->addDirectiveHandler('page', new OffsetDirective());
        $this->addDirectiveHandler('paging', new PagingDirective());
        $this->addDirectiveHandler('printquery', new PrintQueryDirective());
        $this->addDirectiveHandler('returnsingle', new ReturnSingleDirective());
    }
241427
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_EXCEPTION_DEPTH        => 10,
                                   self::CFG_LOG_EXCEPTION_LOCATION => true];
            }
        }
235394
protected function addDefaultLoggingOptions()
    {
        $this
            ->addOption(
                'type',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.type')
            )
            ->addOption(
                'severity',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.severity')
            )
            ->addOption(
                'user-id',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.user-id')
            );
    }
964487
def add_context(self, name, context, prefix_char=None):
        
        if name in self.contexts:
            raise SuiteError("Context already in suite: %r" % name)
        if not context.success:
            raise SuiteError("Context is not resolved: %r" % name)

        self.contexts[name] = dict(name=name,
                                   context=context.copy(),
                                   tool_aliases={},
                                   hidden_tools=set(),
                                   priority=self._next_priority,
                                   prefix_char=prefix_char)
        self._flush_tools()
234025
private function setDefaultConfig()
    {
        $defaults = $this->configRepo->get('laravelPnotify');

        foreach($defaults as $key => $value){
            $this->config[$key] = $value;
        }
    }
249596
public function initializeContext(Context $context)
    {
        if (!$context instanceof FixtureServiceAwareContextInterface && !$this->usesReferenceDictionary($context)) {
            return;
        }

        $context->setFixtureService($this->fixtureService);
    }
187387
public function createContext()
    {
        // context options
        $resolvedOptions = $this->optionsResolver->resolve($this->options);
        $resolvedOptions['content'] = $this->contentResolver->resolve(
            $resolvedOptions['content']
        );

        // create variation
        $variation = $this->variationResolver->resolve(
            (new VariationContext())->denormalize($resolvedOptions)
        );

        return new RenderingContext(
            $resolvedOptions['content'],
            $resolvedOptions['theme'],
            $this->templateResolver->resolve(
                $resolvedOptions['theme'],
                $resolvedOptions['content'],
                $variation,
                $resolvedOptions['templateTypeName']
            ),
            $variation
        );
    }
550602
protected function supplementRequestWithDefaults()
    {
        // properties to set only if they are empty

        if (empty($this->request->getLocation())) {
            $this->request->setLocation( $this->defaults->getLocation() );
        }

        if (empty($this->request->getMethod())) {
            $this->request->setMethod( $this->defaults->getMethod() );
        }

        if (empty($this->request->getParameters())) {
            $this->request->setParameters( $this->defaults->getParameters() );
        }

        if (empty($this->request->getBody())) {
            $this->request->setBody( $this->defaults->getBody() );
        }

        if (    $this->credentialsAreEmpty($this->request->getCredentials())
            &&  ! $this->credentialsAreEmpty($this->defaults->getCredentials())
        ) {
            $this->request->setCredentials(
                $this->defaults->getCredentials()['name'],
                $this->defaults->getCredentials()['password'],
                $this->defaults->getCredentials()['domain']
            );
        }


        // properties to expand

        if ( ! empty($this->defaults->getHeaders())) {

            $this->request->setHeaders(array_merge(
                $this->request->getHeaders(),
                $this->defaults->getHeaders()
            ));
        }

    }
1339856
protected function addDefaultStyles() {
        $this->consoleFormatter->style('error')->parseStyle('clr=white bg=red');
        $this->consoleFormatter->style('warning')->parseStyle('clr=black bg=yellow');
        $this->consoleFormatter->style('success')->parseStyle('clr=black bg=green');

        $this->consoleFormatter->style('question')->parseStyle('clr=green');
        $this->consoleFormatter->style('header')->parseStyle('clr=yellow');
        $this->consoleFormatter->style('title')->parseStyle('clr=yellow');
        $this->consoleFormatter->style('keyword')->parseStyle('clr=green');

        $this->consoleFormatter->style('green')->parseStyle('clr=green');
        $this->consoleFormatter->style('yellow')->parseStyle('clr=yellow');
        $this->consoleFormatter->style('red')->parseStyle('clr=red');
        $this->consoleFormatter->style('white')->parseStyle('clr=white');
        $this->consoleFormatter->style('blue')->parseStyle('clr=blue');
        $this->consoleFormatter->style('gray')->parseStyle('clr=gray');
        $this->consoleFormatter->style('black')->parseStyle('clr=black');

        $this->consoleFormatter->style('bold')->parseStyle('fmt=bold');
        $this->consoleFormatter->style('italic')->parseStyle('fmt=italic');
        $this->consoleFormatter->style('underline')->parseStyle('fmt=underline');
        $this->consoleFormatter->style('strikethrough')->parseStyle('fmt=strikethrough');
    }
1159103
public function loadDefaultDecorators()
    {
        if ($this->loadDefaultDecoratorsIsDisabled()) {
            return;
        }

        $decorators = $this->getDecorators();
        if (empty($decorators)) {
            $this->addDecorator('Tabs', $this->_decoratorOptions)
                ->addDecorator('Label');
        }
    }
764480
def add_default_plugins(self, except_global=[], except_local=[]):
        
        # add default global plugins
        for spec in plugins:
            ptype = spec.get('ptype', 'local')
            if ptype == 'global' and spec.module not in except_global:
                self.add_plugin_spec(spec)

            if ptype == 'local' and spec.module not in except_local:
                self.add_plugin_spec(spec)
1078322
public void installDefaults(SeaGlassContext context, SeaglassUI ui) {
        // Special case the Border as this will likely change when the LAF
        // can have more control over this.
        if (!context.isSubregion()) {
            JComponent c      = context.getComponent();
            Border     border = c.getBorder();

            if (border == null || border instanceof UIResource) {
                c.setBorder(new SeaGlassBorder(ui, getInsets(context, null)));
            }
        }

        installDefaults(context);
    }
89470
protected function _addFormArrayProvider()
    {
        $this->addContextProvider('array', function ($request, $data) {
            if (is_array($data['entity']) && isset($data['entity']['schema'])) {
                return new ArrayContext($request, $data['entity']);
            }
        });
    }