Helper function for returning known paths given a certain type.

Parameters

  • string $type Path type (specified in `Libraries::$_paths`).
  • string $params Path parameters.

Returns

string Valid path name.

Source

						protected static function _locatePath($type, $params) {
		if (!isset(static::$_paths[$type])) {
			return;
		}
		$params += array('app' => LITHIUM_APP_PATH, 'root' => LITHIUM_LIBRARY_PATH);

		foreach (static::$_paths[$type] as $path) {
			if (is_dir($path = str_replace('\\', '/', String::insert($path, $params)))) {
				return $path;
			}
		}
	}