configures instance upon construct
@param \Altamira\JsWriter\JsWriterAbstract $jsWriter
340488
protected function configure( \Altamira\JsWriter\JsWriterAbstract $jsWriter )
	{
	    $confInstance = \Altamira\Config::getInstance();
	    $file = $confInstance['altamira.root'] . $confInstance['altamira.typeconfigpath'];
	    $config = \parse_ini_file( $file, true );
	    
	    $libConfig = $config[strtolower( $jsWriter->getLibrary() )];
	    $type = static::TYPE;
        $typeAttributes = preg_grep( "/$type\./i", array_keys( $libConfig ) );
	    foreach ( $typeAttributes as $key ) {
	        $attribute = preg_replace( "/{$type}\./i", '', $key );
	        $this->{$attribute} = $libConfig[$key];
	    }
	}
46976
protected void configureMethodArgs(Injector injector) {

        Class<?>[] types = method.getParameterTypes();
        extractors = new ArgumentExtractor[types.length];
        patterns = new String[types.length];
        for (int i = 0; i < types.length; i++) {
            final Parameter parameter = method.getParameters()[i];
            final Class<? extends Collection> collectionType;
            final Class<?> objectType;
            if (Collection.class.isAssignableFrom(types[i])) {
                collectionType = (Class<? extends Collection>) types[i];
                objectType = getParameterGenericType(parameter);
            } else {
                collectionType = null;
                objectType = types[i];
            }

            // determine the appropriate extractor
            Class<? extends ArgumentExtractor> extractorType;
            if (FileItem.class == objectType) {
                extractorType = FileItemExtractor.class;
            } else {
                extractorType = ControllerUtil.getArgumentExtractor(parameter);
            }

            // instantiate the extractor
            extractors[i] = injector.getInstance(extractorType);

            // configure the extractor
            if (extractors[i] instanceof ConfigurableExtractor<?>) {
                ConfigurableExtractor extractor = (ConfigurableExtractor) extractors[i];
                Annotation annotation = ClassUtil.getAnnotation(parameter, extractor.getAnnotationClass());
                if (annotation != null) {
                    extractor.configure(annotation);
                }
            }

            if (extractors[i] instanceof SuffixExtractor) {
                // the last parameter can be assigned content type suffixes
                SuffixExtractor extractor = (SuffixExtractor) extractors[i];
                extractor.setSuffixes(contentTypeSuffixes);
            }

            if (collectionType != null) {
                if (extractors[i] instanceof CollectionExtractor) {
                    CollectionExtractor extractor = (CollectionExtractor) extractors[i];
                    extractor.setCollectionType(collectionType);
                } else {
                    throw new FatalException(
                            "Controller method '{}' parameter {} of type '{}' does not specify an argument extractor that supports collections!",
                            Util.toString(method), i + 1, Util.toString(collectionType, objectType));
                }
            }

            if (extractors[i] instanceof TypedExtractor) {
                TypedExtractor extractor = (TypedExtractor) extractors[i];
                extractor.setObjectType(objectType);
            }

            if (extractors[i] instanceof NamedExtractor) {
                // ensure that the extractor has a proper name
                NamedExtractor namedExtractor = (NamedExtractor) extractors[i];
                if (Strings.isNullOrEmpty(namedExtractor.getName())) {
                    // parameter is not named via annotation
                    // try looking for the parameter name in the compiled .class file
                    if (parameter.isNamePresent()) {
                        namedExtractor.setName(parameter.getName());
                    } else {
                        log.error("Properly annotate your controller methods OR specify the '-parameters' flag for your Java compiler!");
                        throw new FatalException(
                                "Controller method '{}' parameter {} of type '{}' does not specify a name!",
                                Util.toString(method), i + 1, Util.toString(collectionType, objectType));
                    }
                }
            }
        }
    }
972946
static void configure(final File f) {
		new Configurator() {

			@Override
			void withConfigurator(JoranConfigurator configurator)
					throws JoranException {
				configurator.doConfigure(f);

			}
		}.configure();
	}
257264
public function setInstance($classOrAlias,$object){
		$this->getClassLoaderService()->setInstance($classOrAlias,$object,$this->getNamespace());
	}
1338119
public static function createFromStyler(Styler $styler) : Writer
    {
        $classname = \get_called_class(); // para permitir abstração
        $instance = new $classname;
        $instance->styler = $styler;
        $instance->reader = $styler->getReader();

        return $instance;
    }
995973
public static function configure(
        HttpClientConfigurator $httpClientConfigurator,
        Hydrator $hydrator = null,
        RequestBuilder $requestBuilder = null
    ): self {
        $httpClient = $httpClientConfigurator->createConfiguredClient();

        return new self($httpClient, $hydrator, $requestBuilder);
    }
654241
public function configure($sName, $sValue)
    {
        switch($sName)
        {
        // Set the separator
        case 'separator':
            if($sValue == '_' || $sValue == '.')
            {
                $this->separator = $sValue;
            }
            break;
        // Set the protected methods
        case 'protected':
            if(is_array($sValue))
            {
                $this->aProtectedMethods = array_merge($this->aProtectedMethods, $sValue);
            }
            elseif(is_string($sValue))
            {
                $this->aProtectedMethods[] = $sValue;
            }
            break;
        default:
            break;
        }
    }
87510
public function setRenderer($renderer)
    {
        $this->renderer = $renderer instanceof AbstractRenderer ?: $this->getRendererManager()->getRenderer((string) $renderer);

        return $this;
    }
96485
@Override
    protected void configure() {

        install(new GuiceJerseyBinder());

        // POJOs
        bind(MyDependency.class).to(DefaultMyDependency.class);

        // vertx-mod-jersey interfaces
        Multibinder.newSetBinder(binder(), VertxRequestProcessor.class).addBinding().to(GuiceRequestProcessor.class);
        Multibinder.newSetBinder(binder(), VertxResponseProcessor.class).addBinding().to(GuiceResponseProcessor.class);
        Multibinder.newSetBinder(binder(), VertxPostResponseProcessor.class).addBinding().to(GuicePostResponseProcessor.class);

        // Jersey interfaces
        Multibinder.newSetBinder(binder(), ContainerRequestFilter.class).addBinding().to(GuiceRequestFilter.class);
        Multibinder.newSetBinder(binder(), ContainerResponseFilter.class).addBinding().to(GuiceResponseFilter.class);

        Multibinder.newSetBinder(binder(), ExceptionMapper.class).addBinding().to(GuiceExceptionMapper.class);

    }
1283483
public static function setRenderer($renderer) {
        if(ClassInfo::classImplements($renderer, 'IMarkdownRenderer')) {
            self::$renderer=$renderer;
        }else {
            user_error('The renderer '.$renderer.' does not implement IMarkdownRenderer', E_USER_ERROR);
        }
    }
556361
protected function configure()
    {
        if (!is_null($this->signature)) {
            $parser = new SignatureParser($this);

            $parser->parse($this->signature);

            $this->setDescription($this->description);
        }
    }
1190942
public function addExtractor(ExtractorInterface $extractor): self
    {
        $this->extractors[$extractor->name()] = $extractor;

        return $this;
    }
813078
public static function setInstance($instance = "") {
		
		if (empty($instance) || !method_exists($instance,'addGlobal')) {
			Console::writeError("please set the instance");
		}
		
		self::$instance = $instance;

	}
646906
@Override
    protected void configure() {

        bind(DefaultVertxContainer.class).to(VertxContainer.class);
        bind(DefaultJerseyServer.class).to(JerseyServer.class);
        bind(DefaultJerseyHandler.class).to(JerseyHandler.class);
        bind(DefaultJerseyOptions.class).to(JerseyOptions.class).to(JerseyServerOptions.class);
        bind(VertxResponseWriterProvider.class).to(ContainerResponseWriterProvider.class);
        bind(WriteStreamBodyWriter.class).to(MessageBodyWriter.class).in(Singleton.class);

        bindFactory(VertxRequestProcessorFactory.class).to(new TypeLiteral<List<VertxRequestProcessor>>() {
        });
        bindFactory(VertxResponseProcessorFactory.class).to(new TypeLiteral<List<VertxResponseProcessor>>() {
        });
        bindFactory(VertxPostResponseProcessorFactory.class).to(new TypeLiteral<List<VertxPostResponseProcessor>>() {
        });

    }
159630
final public function load(string $namespace, string $resource): PrototypeConfigurator
    {
        $this->__destruct();

        return $this->parent->load($namespace, $resource);
    }
520123
public function configureJavascriptTicker(array $jsTickerConfig, ConfigWriter $configWriter)
    {
        $this->assertJsTickerConfig($jsTickerConfig);
        $oldConfig = $this->config['processing']['js_ticker'];
        $this->config['processing']['js_ticker'] = $jsTickerConfig;

        $this->writeConfig($configWriter);

        $this->recordThat(JavascriptTickerWasConfigured::to($jsTickerConfig, $oldConfig));
    }
1107463
private function configureParser()
    {
        $renderer = $parser = null;
        $model = new \RunBB\Model\Admin\Parser();

        $configurator = new \s9e\TextFormatter\Configurator();
        $plugins = unserialize(User::get()->g_parser_plugins);

        $useSmilies = false;
        foreach ($plugins as $k => $plugin) {
            $configurator->plugins->load($plugin);
            if ($plugin === 'Emoticons') {
                $useSmilies = true;
            }
        }

        if ($useSmilies) {
            foreach ($model->getSmilies() as $k => $v) {
                $configurator->Emoticons->add($k, $v['html']);
            }
        }

        $configurator->registeredVars['cacheDir'] = ForumEnv::get('FORUM_CACHE_DIR');

        // Get an instance of the parser and the renderer
        extract($configurator->finalize());

        // We save the parser and the renderer to the disk for easy reuse
        Utils::checkDir($this->cacheDir);

        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Parser.php', serialize($parser));
        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Renderer.php', serialize($renderer));

        $this->parser = $parser;
        $this->renderer = $renderer;
    }