private function parse() {

		$lines = file($this -> viewmodel -> getFile());

		$this -> code = '';

		$classes = [

			'MatchEcho',
			'MatchForeach',
			'MatchEndForeach',
			'MatchFor',
			'MatchEndFor',
			'MatchIf',
			'MatchIsset',
			'MatchNotIsset',
			'MatchEmpty',
			'MatchNotEmpty',
			'MatchElseIf',
			'MatchElse',
			'MatchEndIf',
			'MatchEndIsset',
			'MatchEndNotIsset',
			'MatchEndEmpty',
			'MatchEndNotEmpty',
			'MatchForm',
			'MatchTranslation',
			'MatchEscape',
			'MatchRouter',
			'MatchHelper',
			'MatchPartial',
			'MatchFails',
			'MatchPasses',
			'MatchPHPTags'
		];

		foreach($lines as $linenumber => $line) {
			
			foreach($classes as $class) {
				
				$class = self :: NAMESPACE_MATCH . $class;
				$match = new $class($line);
				$line  = $match -> replace() -> getLine();
			}

			//User defined functions
			foreach(TemplateData :: getTemplateFunctions() as $action => $closure) {

				$class = self :: NAMESPACE_MATCH . 'MatchUserDefined';
				$match = new $class($line, $action);
				$line  = $match -> replace() -> getLine();
			}
			
			$this -> code .= trim($line) . "\n";
		}

		$this -> code = trim($this -> code);

		return $this -> code;
	}
private function parse() {

		$lines = file($this -> viewmodel -> getFile());

		$this -> code = '';

		$classes = [

			'MatchEcho',
			'MatchForeach',
			'MatchEndForeach',
			'MatchFor',
			'MatchEndFor',
			'MatchIf',
			'MatchIsset',
			'MatchNotIsset',
			'MatchEmpty',
			'MatchNotEmpty',
			'MatchElseIf',
			'MatchElse',
			'MatchEndIf',
			'MatchEndIsset',
			'MatchEndNotIsset',
			'MatchEndEmpty',
			'MatchEndNotEmpty',
			'MatchForm',
			'MatchTranslation',
			'MatchEscape',
			'MatchRouter',
			'MatchHelper',
			'MatchPartial',
			'MatchFails',
			'MatchPasses',
			'MatchPHPTags'
		];

		foreach($lines as $linenumber => $line) {
			
			foreach($classes as $class) {
				
				$class = self :: NAMESPACE_MATCH . $class;
				$match = new $class($line);
				$line  = $match -> replace() -> getLine();
			}

			//User defined functions
			foreach(TemplateData :: getTemplateFunctions() as $action => $closure) {

				$class = self :: NAMESPACE_MATCH . 'MatchUserDefined';
				$match = new $class($line, $action);
				$line  = $match -> replace() -> getLine();
			}
			
			$this -> code .= trim($line) . "\n";
		}

		$this -> code = trim($this -> code);

		return $this -> code;
	}
private function parse ( ) { $ lines = file ( $ this -> viewmodel -> getFile ( ) ) ; $ this -> code = '' ; $ classes = [ 'MatchEcho' , 'MatchForeach' , 'MatchEndForeach' , 'MatchFor' , 'MatchEndFor' , 'MatchIf' , 'MatchIsset' , 'MatchNotIsset' , 'MatchEmpty' , 'MatchNotEmpty' , 'MatchElseIf' , 'MatchElse' , 'MatchEndIf' , 'MatchEndIsset' , 'MatchEndNotIsset' , 'MatchEndEmpty' , 'MatchEndNotEmpty' , 'MatchForm' , 'MatchTranslation' , 'MatchEscape' , 'MatchRouter' , 'MatchHelper' , 'MatchPartial' , 'MatchFails' , 'MatchPasses' , 'MatchPHPTags' ] ; foreach ( $ lines as $ linenumber => $ line ) { foreach ( $ classes as $ class ) { $ class = self :: NAMESPACE_MATCH . $ class ; $ match = new $ class ( $ line ) ; $ line = $ match -> replace ( ) -> getLine ( ) ; } //User defined functions
 foreach ( TemplateData :: getTemplateFunctions ( ) as $ action => $ closure ) { $ class = self :: NAMESPACE_MATCH . 'MatchUserDefined' ; $ match = new $ class ( $ line , $ action ) ; $ line = $ match -> replace ( ) -> getLine ( ) ; } $ this -> code .= trim ( $ line ) . "\n" ; } $ this -> code = trim ( $ this -> code ) ; return $ this -> code ; }
Convert template file to string
@return string
Convert template file to string