/** * Adds source paths for classmap discovery. * * The classmap for each source will be cached between requests. * A "clear all caches" will trigger a rescan. * * @param string[] $paths * File paths or wildcard paths for class discovery. * @param bool $relative * If TRUE, the paths will be relative to $this->localDirectory. */ function addClassmapSources($paths, $relative = TRUE) { $relative && $this->prependToPaths($paths); $this->master->addClassmapSources($paths); }
/** * @param ClassFinderAdapter $adapter * @param string[] $sources_raw * Array of files and folders to scan for class implementations. */ protected function addClassmapSources($adapter, array $sources_raw) { foreach ($sources_raw as &$path) { $path = $this->pathPrefix . $path; } $adapter->addClassmapSources($sources_raw); }