private function registerDefaultServices($userSettings)
    {
        $defaultSettings = $this->defaultSettings;

        /**
         * This service MUST return an array or an
         * instance of ArrayAccess.
         *
         * @return array|ArrayAccess
         */
        $this['settings'] = function () use ($userSettings, $defaultSettings) {
            return new Collection(array_merge($defaultSettings, $userSettings));
        };

        $defaultProvider = new DefaultServicesProvider();
        $defaultProvider->register($this);
    }
private function registerDefaultServices($userSettings)
    {
        $defaultSettings = $this->defaultSettings;

        /**
         * This service MUST return an array or an
         * instance of ArrayAccess.
         *
         * @return array|ArrayAccess
         */
        $this['settings'] = function () use ($userSettings, $defaultSettings) {
            return new Collection(array_merge($defaultSettings, $userSettings));
        };

        $defaultProvider = new DefaultServicesProvider();
        $defaultProvider->register($this);
    }
private function registerDefaultServices ( $ userSettings ) { $ defaultSettings = $ this -> defaultSettings ; /**
         * This service MUST return an array or an
         * instance of ArrayAccess.
         *
         * @return array|ArrayAccess
         */ $ this [ 'settings' ] = function ( ) use ( $ userSettings , $ defaultSettings ) { return new Collection ( array_merge ( $ defaultSettings , $ userSettings ) ) ; } ; $ defaultProvider = new DefaultServicesProvider ( ) ; $ defaultProvider -> register ( $ this ) ; }
This function registers the default services that Mbh needs to work.

All services are shared - that is, they are registered such that the
same instance is returned on subsequent calls.

@param array $userSettings Associative array of application settings

@return void
This function registers the default services that Mbh needs to work .