src/Neuron/Core/Template.php
public static function addPath ($path, $prefix = '', $priority = 0)
	{
		if (substr ($path, -1) !== '/')
			$path .= '/';

		if ($prefix) {
			$name = $prefix . '|' . $path;
		}
		else {
			$name = $path;
		}

		// Set priority
		self::$pathpriorities[$name] = $priority;

		// Calculate the position based on priority.
		$position = 0;
		foreach (self::$paths as $path)
		{
			if (self::$pathpriorities[$path] < $priority)
			{
				break;
			}
			$position ++;
		}

		array_splice (self::$paths, $position, 0, array ($name));
	}
public static function addPath ($path, $prefix = '', $priority = 0)
	{
		if (substr ($path, -1) !== '/')
			$path .= '/';

		if ($prefix) {
			$name = $prefix . '|' . $path;
		}
		else {
			$name = $path;
		}

		// Set priority
		self::$pathpriorities[$name] = $priority;

		// Calculate the position based on priority.
		$position = 0;
		foreach (self::$paths as $path)
		{
			if (self::$pathpriorities[$path] < $priority)
			{
				break;
			}
			$position ++;
		}

		array_splice (self::$paths, $position, 0, array ($name));
	}
public static function addPath ( $ path , $ prefix = '' , $ priority = 0 ) { if ( substr ( $ path , - 1 ) !== '/' ) $ path .= '/' ; if ( $ prefix ) { $ name = $ prefix . '|' . $ path ; } else { $ name = $ path ; } // Set priority self :: $ pathpriorities [ $ name ] = $ priority ; // Calculate the position based on priority. $ position = 0 ; foreach ( self :: $ paths as $ path ) { if ( self :: $ pathpriorities [ $ path ] < $ priority ) { break ; } $ position ++ ; } array_splice ( self :: $ paths , $ position , 0 , array ( $ name ) ) ; }
Add a folder to the template path.
@param $path: path to add
@param $prefix: only templates starting with given prefix will be loaded from this path.
@param $priority
Add a folder to the template path .