Initialize the defaults.

@since 3.0.0

@return void
174223
protected function initDefaults()
    {
        if (!$this->hasDefaults) {
            return '';
        }

        $this->defaultsLocation = get_calling_class_directory($this) . DIRECTORY_SEPARATOR . $this->defaultsLocation;

        return ConfigFactory::loadConfigFile($this->defaultsLocation);
    }
971085
public function initialize() {
		Configure::write('Cache.disable', true);
		parent::initialize();

		if (!Configure::check('CakeInstaller')) {
			$this->ConfigInstaller->initConfig();
		}

		foreach ($this->_defaultConfigs['default'] as $paramName => &$paramOptions) {
			if (isset($paramOptions['label'])) {
				$paramOptions['label'] = __d('cake_installer_label', $paramOptions['label']);
			}
		}
	}
965797
protected function setDefaults() {
        if ($this->getAccept() === null) {
            $this->setDefaultAccept();
        }

        if ($this->getContentType() === null) {
            $this->setDefaultContentType();
        }
    }
331964
protected function initAllConfigs()
    {
        if ($this->isInitialized) {
            return;
        }

        $this->logger->info('Checking and initializing config files');
        foreach ($this->getEnvironments() as $environment) {
            $this->initConfig($environment);
        }

        $this->isInitialized = true;
    }
1299195
public function buildDefaults()
    {
        $dataClasses = ClassInfo::subclassesFor(DataObject::class);
        array_shift($dataClasses);

        if (!Director::is_cli()) {
            echo "<ul>";
        }

        foreach ($dataClasses as $dataClass) {
            singleton($dataClass)->requireDefaultRecords();
            if (Director::is_cli()) {
                echo "Defaults loaded for $dataClass\n";
            } else {
                echo "<li>Defaults loaded for $dataClass</li>\n";
            }
        }

        if (!Director::is_cli()) {
            echo "</ul>";
        }
    }
650442
public function init()
    {
        $this->header('Content-Type: text/html'); // default header.

        $this->proc = new \PHPDaemon\Core\ShellCommand();
        $this->proc->readPacketSize = $this->appInstance->readPacketSize;
        $this->proc->onReadData([$this, 'onReadData']);
        $this->proc->onWrite([$this, 'onWrite']);
        $this->proc->binPath = $this->appInstance->binPath;
        $this->proc->chroot = $this->appInstance->chroot;

        if (isset($this->attrs->server['BINPATH'])) {
            if (isset($this->appInstance->binAliases[$this->attrs->server['BINPATH']])) {
                $this->proc->binPath = $this->appInstance->binAliases[$this->attrs->server['BINPATH']];
            } elseif ($this->appInstance->config->allowoverridebinpath->value) {
                $this->proc->binPath = $this->attrs->server['BINPATH'];
            }
        }

        if (isset($this->attrs->server['CHROOT']) && $this->appInstance->config->allowoverridechroot->value) {
            $this->proc->chroot = $this->attrs->server['CHROOT'];
        }

        if (isset($this->attrs->server['SETUSER']) && $this->appInstance->config->allowoverrideuser->value) {
            $this->proc->setUser = $this->attrs->server['SETUSER'];
        }

        if (isset($this->attrs->server['SETGROUP']) && $this->appInstance->config->allowoverridegroup->value) {
            $this->proc->setGroup = $this->attrs->server['SETGROUP'];
        }

        if (isset($this->attrs->server['CWD']) && $this->appInstance->config->allowoverridecwd->value) {
            $this->proc->cwd = $this->attrs->server['CWD'];
        } elseif ($this->appInstance->config->cwd->value !== null) {
            $this->proc->cwd = $this->appInstance->config->cwd->value;
        } else {
            $this->proc->cwd = dirname($this->attrs->server['SCRIPT_FILENAME']);
        }

        $this->proc->setArgs([$this->attrs->server['SCRIPT_FILENAME']]);
        $this->proc->setEnv($this->attrs->server);
        $this->proc->execute();
    }
86649
protected function initialize()
    {
        $itemData = $this->getItemData();

        $itemsMerged = array();
        foreach ($itemData as $key => $itemOptions)
        {
            $itemsMerged[$key] = array_merge($this->defaults, $itemOptions);

            if (isset($itemsMerged[$key]['children']['.defaults']))
            {
                $itemsMerged[$key]['children']['.defaults'] = array_merge($this->defaults, $itemsMerged[$key]['children']['.defaults']);
            }
            else
            {
                $itemsMerged[$key]['children']['.defaults'] = $this->defaults;
            }
        }

        $this->baseItem = $this->createItem('', array(
            'title' => '',
            'item_class' => 'C33s\MenuBundle\Item\MenuItem',
            'children' => $itemsMerged,
        ));
    }
104637
private function init()
    {
        // Define Default Config:
        
        $this->setConfig(self::$default_config);
        
        // Load JSON Config File:
        
        $file = new JsonFile(self::CONFIG_FILE);
        
        // Merge JSON Config (if file exists):
        
        if ($file->exists()) {
            $this->mergeConfig($file->read());
        }
    }
1029092
public function initializeDefaultAliases()
    {
        foreach ($this->defaultAliases as $def => $entityClass) {
            $table = $this->namingStrategy->classToTableName($entityClass);
            $this->defaultAliases[$table] = $entityClass;
        }

        foreach ($this->aliases as $prefixed) {
            $entity = isset($this->defaultAliases[$prefixed]) ? $this->defaultAliases[$prefixed] : null;
            if ($entity !== null) {
                $this->setDefaultAlias($prefixed, $entity);
            }
        }
    }
747808
public function init(): void
    {
        parent::init();

        if ($this->default !== '' && $this->default !== null && !is_array($this->default)) {
            try {
                $default = Json::decode($this->default);

                if (is_array($default)) {
                    $this->default = $default;
                }
            } catch (InvalidArgumentException $exception) {}
        }
    }
982219
private function fill_defaults()
	{
		if ( ! array_key_exists('ID', $this->attributes) ) {

			$this->attributes['post_type'] = $this->type;

			$this->attributes['post_status'] = $this->status;

		}
	}
894909
public function setDefault(): void
	{
		$repo = $this->getRepository();
		$locales = $repo->findAll();
		foreach ($locales as $locale) {
			/* @var $locale self */
			$locale->default = false;
			$repo->persist($locale);
		}
		$this->default = true;
		$repo->persist($this);
		$repo->flush();
	}
1346615
protected function defaults()
    {
        parent::defaults();

        if ($this->isMissingLeft()) {
            $this->left();
        }

        if ($this->isMissingRight()) {
            $this->right();
        }
    }
468509
public function init()
    {
        $this->errors = array();
        $this->schemaFile = realpath(__DIR__ . '/../../../../../') . DIRECTORY_SEPARATOR . self::DEFAULT_XML_SCHEMA;
        $this->schemaFiles = array();
    }
206841
protected function assignDefaultValues()
	{
		foreach ($this->defaultValues as $key => $value) {
			$this->model[$key] = $value;
		}

        return true;
	}
1097314
protected function setDefaultOptions() : void
    {
        $this->setDefaultFieldOptions();
        $this->setDefaultFieldDefinitions();
        $this->setDefaultLabel();
        $this->setDefaultValue();
    }
260463
def init_defaults(self):
        
        self.sql = ''
        self.tables = []
        self.joins = []
        self._where = Where()
        self.groups = []
        self.sorters = []
        self._limit = None
        self.table_prefix = ''
        self.is_inner = False
        self.with_tables = []
        self._distinct = False
        self.distinct_ons = []
        self.field_names = []
        self.field_names_pk = None
        self.values = []