public function execute(\Template $template)
	{
		if(!Bootstrap::isEnabled())
		{
			return;
		}

		foreach($GLOBALS['BOOTSTRAP']['templates']['modifiers'] as $config)
		{
			if($config['disabled'] || !$this->isTemplateAffected($template->getName(), $config['templates']))
			{
				continue;
			}

			if($config['type'] == 'replace')
			{
				if(is_callable($config['replace']))
				{
					$value = call_user_func($config['replace'], $template);
				}
				else
				{
					$value = $config['replace'];
				}

				$template->$config['key'] = str_replace($config['search'], $value, $template->$config['key']);
			}
			elseif($config['type'] == 'callback')
			{
				call_user_func($config['callback'], $template);
			}
		}
	}
public function execute(\Template $template)
	{
		if(!Bootstrap::isEnabled())
		{
			return;
		}

		foreach($GLOBALS['BOOTSTRAP']['templates']['modifiers'] as $config)
		{
			if($config['disabled'] || !$this->isTemplateAffected($template->getName(), $config['templates']))
			{
				continue;
			}

			if($config['type'] == 'replace')
			{
				if(is_callable($config['replace']))
				{
					$value = call_user_func($config['replace'], $template);
				}
				else
				{
					$value = $config['replace'];
				}

				$template->$config['key'] = str_replace($config['search'], $value, $template->$config['key']);
			}
			elseif($config['type'] == 'callback')
			{
				call_user_func($config['callback'], $template);
			}
		}
	}
public function execute ( \ Template $ template ) { if ( ! Bootstrap :: isEnabled ( ) ) { return ; } foreach ( $ GLOBALS [ 'BOOTSTRAP' ] [ 'templates' ] [ 'modifiers' ] as $ config ) { if ( $ config [ 'disabled' ] || ! $ this -> isTemplateAffected ( $ template -> getName ( ) , $ config [ 'templates' ] ) ) { continue ; } if ( $ config [ 'type' ] == 'replace' ) { if ( is_callable ( $ config [ 'replace' ] ) ) { $ value = call_user_func ( $ config [ 'replace' ] , $ template ) ; } else { $ value = $ config [ 'replace' ] ; } $ template -> $ config [ 'key' ] = str_replace ( $ config [ 'search' ] , $ value , $ template -> $ config [ 'key' ] ) ; } elseif ( $ config [ 'type' ] == 'callback' ) { call_user_func ( $ config [ 'callback' ] , $ template ) ; } } }
execute all registered template modifiers

@param \Template $template
execute all registered template modifiers