public static function addTemplateRoot(
		array &$globalConfig,
		string $directory,
		string $trim,
		string $referenceName = ''
	) {
		if (!isset($globalConfig['view'])) {
			$globalConfig['view'] = [];
		}
		if (!isset($globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS])) {
			$globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS] = [];
		}
		$globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS][] = [
			'directory' => $directory,
			'trim'      => $trim,
			'name'      => $referenceName,
		];
	}
public static function addTemplateRoot(
		array &$globalConfig,
		string $directory,
		string $trim,
		string $referenceName = ''
	) {
		if (!isset($globalConfig['view'])) {
			$globalConfig['view'] = [];
		}
		if (!isset($globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS])) {
			$globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS] = [];
		}
		$globalConfig['view'][self::CONFIG_TEMPLATE_ROOTS][] = [
			'directory' => $directory,
			'trim'      => $trim,
			'name'      => $referenceName,
		];
	}
public static function addTemplateRoot ( array & $ globalConfig , string $ directory , string $ trim , string $ referenceName = '' ) { if ( ! isset ( $ globalConfig [ 'view' ] ) ) { $ globalConfig [ 'view' ] = [ ] ; } if ( ! isset ( $ globalConfig [ 'view' ] [ self :: CONFIG_TEMPLATE_ROOTS ] ) ) { $ globalConfig [ 'view' ] [ self :: CONFIG_TEMPLATE_ROOTS ] = [ ] ; } $ globalConfig [ 'view' ] [ self :: CONFIG_TEMPLATE_ROOTS ] [ ] = [ 'directory' => $ directory , 'trim' => $ trim , 'name' => $ referenceName , ] ; }
Helper function to add a template root directory.

@param array  $globalConfig  The global configuration array.
@param string $directory     The directory to look for a template in.
@param string $trim          Parts to remove from the controller name
@param string $referenceName Name to reference root by. Can be used with some template engines.
Helper function to add a template root directory .