lithium\core\Libraries::_searchPaths()

protected static method

Returns the list of valid search path templates for the given service location lookup.

Parameters

  • array $paths

    The list of all possible path templates from Libraries::$_paths.

  • string $library

    The name of the library being searched.

Returns

array

Returns an array of valid path template strings.

Source

	protected static function _searchPaths($paths, $library) {
		$result = [];

		foreach ($paths as $tpl => $opts) {
			if (is_int($tpl)) {
				$tpl = $opts;
				$opts = [];
			}
			if (isset($opts['libraries']) && !in_array($library, (array) $opts['libraries'])) {
				continue;
			}
			$result[] = $tpl;
		}
		return $result;
	}