/**
* Adds to the search path for templates and resources.
*
* @param string $type The type of path to add.
* @param mixed $path The directory or stream, or an array of either, to search.
*
* @return void
*
* @since 3.0
*/
protected function _addPath($type, $path)
{
// Loop through the path directories
foreach ((array) $path as $dir) {
// Clean up the path
$dir = Path::clean($dir);
// Add trailing separators as needed
if (substr($dir, -1) !== DIRECTORY_SEPARATOR) {
// Directory
$dir .= DIRECTORY_SEPARATOR;
}
// Add to the top of the search dirs
array_unshift($this->_path[$type], $dir);
}
}