Processes the template
@return string
186789
public function process()
    {
        if ($this->cache !== null) {
            return $this->cache;
        } else {
            return ($this->cache = UriTemplate::expand($this->template, $this->data));
        }
    }
647325
protected function parse_template() {

        if (empty($this->params)) {
            $this->params = array();
            if (isset($_SERVER['PATH_INFO']) && !empty($_SERVER['PATH_INFO'])) {
                $path = explode('/', $_SERVER['PATH_INFO']);
                $parts = explode('/', $this->get_template());
                for ($i = 0; $i < count($parts); $i++) {
                    if ((substr($parts[$i], 0, 1) == '{') && (substr($parts[$i], -1) == '}')) {
                        $value = '';
                        if ($i < count($path)) {
                            $value = $path[$i];
                        }
                        $this->params[substr($parts[$i], 1, -1)] = $value;
                    }
                }
            }
        }

        return $this->params;

    }
1122465
public function process()
    {
        $this->form->handleRequest($this->request);
        $this->model = $this->form->getData();

        return $this->form->isSubmitted() && $this->form->isValid() && $this->processForm($this->model);
    }
886669
private function processExternalTemplater()
    {
        $template_extension = pathinfo($this->router_instance->getPageData()['file'], PATHINFO_EXTENSION);

        // Render twig file. e.g. file.twig
        if ($template_extension == 'twig') {
            if (Settings::isFrontendLogEnabled()) {
                FrontendLogger::getInstance()->log('Processing twig template');
            }
            $templater = new ExternalTemplater('twig');
            $this->html = $templater->processHtml($this->html, $this->router_instance->getPageData());

            return;
        }

        // Check blade files, e.g. file.blade.php
        if (stripos($this->router_instance->getPageData()['file'], '.blade.php') !== false) {
            if (Settings::isFrontendLogEnabled()) {
                FrontendLogger::getInstance()->log('Processing blade template');
            }
            $templater = new ExternalTemplater('blade');
            $this->html = $templater->processHtml($this->html, $this->router_instance->getPageData());

            return;
        }
    }
898026
public function process()
    {
        $entityDefs = $this->getEntityDefs(true);

        $ormMetadata = array();
        foreach($entityDefs as $entityName => $entityMetadata) {

            if (empty($entityMetadata)) {
                $GLOBALS['log']->critical('Orm\Converter:process(), Entity:'.$entityName.' - metadata cannot be converted into ORM format');
                continue;
            }

            $ormMetadata = Util::merge($ormMetadata, $this->convertEntity($entityName, $entityMetadata));
        }

        $ormMetadata = $this->afterProcess($ormMetadata);

        return $ormMetadata;
    }
560119
public function prepare()
    {
        // clear just in case settings changed and cache is out of date
        $this->externalMacroTemplatesCache = array();

        // find the template source file and update function name
        $this->setCodeFile();

        if (!function_exists($this->getFunctionName())) {
            // parse template if php generated code does not exists or template
            // source file modified since last generation or force reparse is set
            if ($this->getForceReparse() || !file_exists($this->getCodePath())) {

                // i'm not sure where that belongs, but not in normal path of execution
                // because some sites have _a lot_ of files in temp
                if ($this->getCachePurgeFrequency() && mt_rand()%$this->getCachePurgeFrequency() == 0) {
                    $this->cleanUpGarbage();
                }

                $result = $this->parse();

                if (!file_put_contents($this->getCodePath(), $result)) {
                    throw new PHPTAL_IOException('Unable to open '.$this->getCodePath().' for writing');
                }

                // the awesome thing about eval() is that parse errors don't stop PHP.
                // when PHP dies during eval, fatal error is printed and
                // can be captured with output buffering
                ob_start();
                try {
                    eval("?>\n".$result);
                }
                catch(ParseError $parseError) {
                    ob_end_clean();
                    throw new PHPTAL_TemplateException(
                        'Parse error: ' . $parseError->getMessage(),
                        $this->getCodePath(),
                        $parseError->getLine(),
                        $parseError
                    );
                }
                catch(Exception $e) {
                    ob_end_clean();
                    throw $e;
                }

                if (!function_exists($this->getFunctionName())) {
                    $msg = str_replace('eval()\'d code', $this->getCodePath(), ob_get_clean());

                    // greedy .* ensures last match
                    if (preg_match('/.*on line (\d+)$/m', $msg, $m)) $line=$m[1]; else $line=0;
                    throw new PHPTAL_TemplateException(trim($msg), $this->getCodePath(), $line);
                }
                ob_end_clean();

            } else {
                // eval trick is used only on first run,
                // just in case it causes any problems with opcode accelerators
                require $this->getCodePath();
            }
        }

        $this->_prepared = true;
        return $this;
    }
463751
function processTemplates(templates) {
	var templateProcessingLog = logger.createTemplateProcessingLog();
	var replacements = Mix.manifest.get();
	for (let template in templates) {
		if (templates.hasOwnProperty(template)) {
			// Copy to target
			fs.copySync(template, templates[template]);
			// Compile
			compileTemplate(
				templates[template],
				replacements,
				templateProcessingLog.addTemplateFileLog(
					template,
					templates[template]
				)
			);
		}
	}
	templateProcessingLog.print();
}
846044
public function render()
	{
		$path = $this->template;
		if (array_key_exists($path, ViewModel::$availableTemplates)) {
			$path = 'src/' . ViewModel::$availableTemplates[$this->template];
		}
		if (file_exists($path)) {
			ob_start();
			include($path);
			$output = ob_get_contents();
			ob_end_clean();
			return $output;
		} else {
			throw new \Exception("The requested template (" . $path . ") not found!");
		}
	}
578025
public function process()
        {
            if ($this->_isXhtml === null) {
                $this->_isXhtml = (false !== strpos($this->_html, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML'));
            }

            $this->_replacementHash = 'MINIFYHTML' . md5($_SERVER['REQUEST_TIME']);
            $this->_placeholders = array();

            // replace SCRIPTs (and minify) with placeholders
            $this->_html = preg_replace_callback(
                    '/(\\s*)(<script\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'
                    , array($this, '_removeScriptCB')
                    , $this->_html);

            // replace STYLEs (and minify) with placeholders
            $this->_html = preg_replace_callback(
                    '/\\s*(<style\\b[^>]*?>)([\\s\\S]*?)<\\/style>\\s*/i'
                    , array($this, '_removeStyleCB')
                    , $this->_html);

            // remove HTML comments (not containing IE conditional comments).
            $this->_html = preg_replace_callback(
                    '/<!--([\\s\\S]*?)-->/'
                    , array($this, '_commentCB')
                    , $this->_html);

            // replace PREs with placeholders
            $this->_html = preg_replace_callback('/\\s*(<pre\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/i'
                    , array($this, '_removePreCB')
                    , $this->_html);

            // replace TEXTAREAs with placeholders
            $this->_html = preg_replace_callback(
                    '/\\s*(<textarea\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
                    , array($this, '_removeTextareaCB')
                    , $this->_html);

            // trim each line.
            // @todo take into account attribute values that span multiple lines.
            $this->_html = preg_replace('/^\\s+|\\s+$/m', '', $this->_html);

            // remove ws around block/undisplayed elements
            $this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
                    . '|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
                    . '|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
                    . '|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
                    . '|ul)\\b[^>]*>)/i', '$1', $this->_html);

            // remove ws outside of all elements
            $this->_html = preg_replace_callback(
                    '/>([^<]+)</'
                    , array($this, '_outsideTagCB')
                    , $this->_html);

            // use newlines before 1st attribute in open tags (to limit line lengths)
            $this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html);

            // fill placeholders
            $this->_html = str_replace(
                    array_keys($this->_placeholders)
                    , array_values($this->_placeholders)
                    , $this->_html
            );

            return $this->_html;
        }
342920
private function render() {
        $parsed_data = Parser::parse($this->input_path);

        if ($parsed_data['frontmatter'] !== false && !$this->should_ignore()) {
            return Template::render($parsed_data['content'], $parsed_data['frontmatter']);
        }

        return $parsed_data['content'];
    }
1033014
public function processRoutes()
    {
        if ($this->routes) {

            $template = $this->getTemplate('routes');
            $routes = '';


            if (trim($this->option('table')) === 'all') {

                foreach ($this->tables as $table) {
                    $m = [
                        'plural_uc' => ucwords($table->plural),
                        'plural' => $table->plural,
                        'kebab_plural' => kebab_case($table->plural),
                    ];

                    $temp = $template;

                    foreach ($this->marks()['routes'] as $mark){
                        $temp = str_replace('{{{' . $mark . '}}}', trim($m[$mark]), $temp);
                    }

                    $routes .= $temp;
                }


            } elseif (trim($this->option('table')) !== '') {

                $tableKey = $this->option('table');

                $table = $this->tables[$tableKey];

                $m = [
                    'plural_uc' => ucwords($table->plural),
                    'plural' => $table->plural,
                    'kebab_plural' => kebab_case($table->plural),
                ];

                $temp = $template;

                foreach ($this->marks()['routes'] as $mark){
                    $temp = str_replace('{{{' . $mark . '}}}', trim($m[$mark]), $temp);
                }

                $routes = $temp;

            }

            $fileWeb = fopen(base_path() . '/routes/web.php', 'a+');
            fwrite($fileWeb, $routes);
            fclose($fileWeb);
        }
    }
1209398
public function render_template() {
		// template
		$_output = null;

		if ( ! empty( $this->struct['template'] ) ) {
			ob_start();
			include $this->struct['template'];
			$_output .= ob_get_clean();
		}

		return $_output;
	}
733548
public function process()
	{
		$view = $this->getView();
		$session = $this->_getContext()->getSession();

		if( ( $languageId = $view->param( 'loc-languageid' ) ) !== null ) {
			$session->set( 'arcavias/locale/languageid', $languageId );
		}

		if( ( $currencyId = $view->param( 'loc-currencyid' ) ) !== null ) {
			$session->set( 'arcavias/locale/currencyId', $currencyId );
		}

		parent::process();
	}
1257446
public function getTemplate() : ?string 
    {
        if ( ! $this->hasTemplate()) {
            $this->setTemplate($this->getDefaultTemplate());
        }
        return $this->template;
    }
809835
public function process()
    {
        // Your controller name
        $this->controller = Inflector::classify($this->argument('name')).'Controller';
        // Model name
        $this->model = Inflector::classify($this->argument('model'));
        /*
         | Check for argument database name if not given we will use default
         |  database connection
         */
        $this->database = (!is_null($this->argument('database'))) ?
            $this->argument('database') :
            $this->table()->getDefaultDatabaseConnection();

        // By default we will generate plain php layout and view pages
        $this->viewType = ($this->option('template') == false) ? 'php' : 'twig';
        $this->columns = $this->getColumns();

        if (empty($this->columns)) {
            exit($this->error("Please provide valid table name. It seems doesn't exists in the database."));
        }

        $this->applicationDir = CYGNITE_BASE.DS.APPPATH;

        $this->generateController();
        $this->generateModel();
        $this->generateViews();

        $controller = str_replace('Controller', '', $this->controller);

        $this->comment("\n".'You need to route the controller to access methods from browser, add
        $this->routesController->controller("'.$controller.'"); inside the method '."\n".'
        \Apps\Routing\RouteCollection::executeStaticRoutes();'."\n");

        $this->info('Crud Generated Successfully By Cygnite Cli.');
    }
1166875
public function process ()
    {
        if ($this->isProcessed)
            return;
        $this->isProcessed = true;
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->preprocess();
        $this->isUserSubmitted = $this->getValue($this->getSubmitConfirmFieldName(), 'false') == 'true' || $this->forceSubmit;
        if ($this->isUserSubmitted) {
            foreach ($this->getFields() as $field)
                $field->restoreValue($this->method);

            $this->activateHandlers();

            if ($this->isValid()) {
                $this->submit();
            }
        }
    }
794532
public function compile() {
		foreach ($this->_params as $key => $value) {
			if (!strpos($key, ':')) {
				continue;
			}
			unset($this->_params[$key]);
			$this->_meta[$key] = $value;
		}

		$this->_match = $this->_params;

		if ($this->_template === '/' || $this->_template === '') {
			$this->_pattern = '@^/*$@';
			return;
		}
		$this->_pattern = "@^{$this->_template}\$@";
		$match = '@([/.])?\{:([^:}]+):?((?:[^{]+?(?:\{[0-9,]+\})?)*?)\}@S';

		if ($this->_config['unicode']) {
			$this->_pattern .= 'u';
		}
		preg_match_all($match, $this->_pattern, $m);

		if (!$tokens = $m[0]) {
			return;
		}
		$slashes = $m[1];
		$params = $m[2];
		$regexs = $m[3];
		unset($m);
		$this->_keys = [];

		foreach ($params as $i => $param) {
			$this->_keys[$param] = $param;
			$this->_pattern = $this->_regex($regexs[$i], $param, $tokens[$i], $slashes[$i]);
		}
		$this->_defaults += array_intersect_key($this->_params, $this->_keys);
		$this->_match = array_diff_key($this->_params, $this->_defaults);
	}