Sets Dwoo compiler

@param string|Dwoo_Compiler Object or name of the class
506708
public function setCompiler($compiler)
	{

		// if param given as an object
		if ($compiler instanceof Dwoo_ICompiler) {
			$this->_compiler = $compiler;
		}
		// if param given as a string
		elseif (is_subclass_of($compiler, 'Dwoo_Compiler') || 'Dwoo_Compiler' == $compiler) {
			$this->_compiler = new $compiler;
		}
		else {
			throw new Dwoo_Exception("Custom compiler must be a subclass of Dwoo_Compiler or instance of Dwoo_ICompiler");
		}
	}
764511
public void setCompileVersion(String version) {
        if (version == null || ClassUtils.isBeforeJava6(version)) {
            JavassistCompiler javassistCompiler = new JavassistCompiler();
            javassistCompiler.setLogger(logger);
            javassistCompiler.setCodeDirectory(codeDirectory);
            compiler = javassistCompiler;
        } else {
            JdkCompiler jdkCompiler = new JdkCompiler();
            jdkCompiler.setCompileVersion(version);
            jdkCompiler.setLogger(logger);
            jdkCompiler.setCodeDirectory(codeDirectory);
            compiler = jdkCompiler;
        }
    }
872695
public function enableCompiler()
    {
        // Check if the compiler is auto enabled
        $state = $this->app['config']->get('laravel-shortcodes::enabled', false);

        // Enable when needed
        if ($state) {
            $this->app['shortcode.compiler']->enable();
        }
    }
1356236
public function compile($data = null)
    {
        if ($data)
        {
            $data = array_merge($data, TemplateSettings::getGlobalValues());
        }
        else
        {
            $data = TemplateSettings::getGlobalValues();
        }

        return self::$dwoo->get($this->template, $data);
    }
910810
protected static void set(MetaLocale src, MetaLocale dst, int flags) {
    dst.setLanguage((flags & LANGUAGE) == 0 ? null : src._language());
    dst.setScript((flags & SCRIPT) == 0 ? null : src._script());
    dst.setTerritory((flags & TERRITORY) == 0 ? null : src._territory());
  }
358026
private function compileAndSetName() { 
      $name = \Nuki\Handlers\Core\Assist::classNameShort($this);
      
      $this->name = strtolower($name);
    }
782377
public function setCompileDirectory()
    {
        $compilePath = $this->getTemplatesDirectory() . DIRECTORY_SEPARATOR . $this->compileDirectoryName . DIRECTORY_SEPARATOR;

        if (!file_exists($compilePath))
        {
            static::mkdir($compilePath);
        }

        $this->compilePath = $compilePath;
    }
1046375
public function compile(\Twig_Compiler $compiler)
    {
        $compiler->addDebugInfo($this);

        $compiler
            ->raw('ob_start();' . PHP_EOL)
            ->subcompile($this->getNode('source'))
            ->raw('$source = ob_get_contents();' . PHP_EOL)
            ->raw('ob_clean();' . PHP_EOL)
            ->raw('echo $this->env->getExtension(\'highlight_extension\')->highlight(' . PHP_EOL)
            ->raw('   $source,' . PHP_EOL)
            ->raw('   \'' . $this->getNode('lexer')->getAttribute('name') . '\' ' . PHP_EOL)
            ->raw(');' . PHP_EOL);
    }
1066692
public static function parser()
	{
		if ( ! empty(static::$_parser))
		{
			return static::$_parser;
		}

		// Parser
		static::$_parser = new Dwoo();
		static::$_parser->setCacheTime(\Config::get('parser.View_Dwoo.environment.cache_time', 0));
		static::$_parser->setCacheDir(\Config::get('parser.View_Dwoo.environment.cache_dir', APPPATH.'cache'.DS.'dwoo'.DS));
		static::$_parser->setCompileDir(\Config::get('parser.View_Dwoo.environment.compile_dir', APPPATH.'cache'.DS.'dwoo'.DS.'compiled'.DS));

		// Compiler
		static::$_parser_compiler = new Dwoo_Compiler;
		static::$_parser_compiler->setAutoEscape(\Config::get('parser.View_Dwoo.environment.autoescape', false));
		static::$_parser_compiler->setLooseOpeningHandling(\Config::get('parser.View_Dwoo.environment.allow_spaces', false));
		static::$_parser_compiler->setNestedCommentsHandling(\Config::get('parser.View_Dwoo.environment.nested_comments', false));
		static::$_parser_compiler->setDelimiters(
			\Config::get('parser.View_Dwoo.delimiters.left', '{'),
			\Config::get('parser.View_Dwoo.delimiters.right', '}')
		);

		// Security
		static::$_parser_security = new Dwoo_Security_Policy;
		static::$_parser_security->setPhpHandling(\Config::get('parser.View_Dwoo.environment.allow_php_tags', 2));
		static::$_parser_security->allowPhpFunction(\Config::get('parser.View_Dwoo.environment.allow_php_func', array()));

		static::$_parser->setSecurityPolicy(static::$_parser_security);

		return static::$_parser;
	}
11547
def set_window_class(self, window, name, class_):
        
        _libxdo.xdo_set_window_class(self._xdo, window, name, class_)
862542
public function beforeCompile(): void
	{
		$builder = $this->getContainerBuilder();

		// Register as services
		foreach ($builder->findByType(IContainerAware::class) as $service) {
			$service->addSetup('setContainer');
		}
	}
962724
private function setClassComment()
    {

        $connectionSettings = $this->entity->pgClass->getCatalog()->db->resource->connectionSettings;

        $header = new Sformatf( <<<TEXT
            ConnectionInfo %s@%s:%s,
            Relation %s
TEXT
            , $connectionSettings->dbname,
            $connectionSettings->user,
            $connectionSettings->host,
            $this->entity->pgClass->getFullyQualifiedName()
        );

        $this->class->setClassComment( $header->docblockify() );

    }
1095657
protected function compileTags(Compiler $compiler): void
    {
        $tagClass = $this->getAttribute('tagClass');
        $assets = $this->getAttribute('assets');
        $attributes = $this->getAttribute('attributes');
        $position = $this->getAttribute('position');

        foreach ($assets as $asset) {
            $compiler
                ->write(sprintf('->addTag(new \%s(', $tagClass))
                ->repr($asset)
                ->raw(', ')->repr($attributes)
                ->raw(', ')->repr($position)
                ->raw(', ')->repr($this->getTemplateLine())
                ->raw(', ')->repr($this->getTemplateName())
                ->raw('))'.PHP_EOL)
            ;
        }
    }
118295
public void setCompilationLevel(String value) {
    if ("simple".equalsIgnoreCase(value)) {
      this.compilationLevel = CompilationLevel.SIMPLE_OPTIMIZATIONS;
    } else if ("advanced".equalsIgnoreCase(value)) {
      this.compilationLevel = CompilationLevel.ADVANCED_OPTIMIZATIONS;
    } else if ("whitespace".equalsIgnoreCase(value)) {
      this.compilationLevel = CompilationLevel.WHITESPACE_ONLY;
    } else {
      throw new BuildException(
          "Unrecognized 'compilation' option value (" + value + ")");
    }
  }
1288148
public function compile(Compiler $compiler): void
    {
        if ($this->module->hasAttribute('is_embedded')) {
            return;
        }

        /** @var Source $source */
        $source = $this->getSourceContext();
        $templateName = $source->getName();

        $extensionClass = Extension::class;
        $suppressedExceptionClass = SuppressedException::class;
        $viewClass = View::class;

        $compiler
            ->raw("\n")
            ->write("if (\$suppressedException instanceof {$suppressedExceptionClass}) {\n")
            ->indent()
            ->write("throw \$suppressedException;\n")
            ->outdent()
            ->write("}\n")
            ->outdent()
            ->write("};\n\n")
            ->write("\$this->env\n")
            ->indent()
            ->write("->getExtension({$extensionClass}::class)\n")
            ->write("->process(new {$viewClass}('{$templateName}', \$presentationModel, \$callback));\n")
            ->outdent();
    }
579467
private function compileContextNode(Compiler $compiler): void
    {
        $contextNode = null;
        if ($this->hasNode('context')) {
            $contextNode = $this->getNode('context');
        }

        if ($contextNode instanceof Node) {
            $compiler
                ->write('$ngbmContext = ')
                    ->subcompile($this->getNode('context'))
                ->write(';' . PHP_EOL);

            return;
        }

        $compiler->write('$ngbmContext = ' . ViewInterface::class . '::CONTEXT_DEFAULT;' . PHP_EOL);
    }
426037
public function setIo(GoracashIO $ioObject)
    {
        $this->config->setIoClass(get_class($ioObject));
        $this->io = $ioObject;
    }