Registers a set of classes, replacing any others previously set.

@param string       $prefix  the classes prefix
@param array|string $paths   the location(s) of the classes
495094
public function set($prefix, $paths) {
		if (!$prefix) {
			$this->fallbackDirs = (array) $paths;
			return;
		}

		$this->prefixes[$prefix] = (array) $paths;
	}
749863
public function register_namespace( $namespace, $paths )
    {
        if ( isset( $this->namespaces[ $namespace ] ) )
        {
            $this->namespaces[ $namespace ] = array_merge(
                $this->namespaces[ $namespace ],
                (array) $paths
            );
        } 
        else 
        {
            $this->namespaces[ $namespace ] = (array) $paths;
            
            // Register PSR_0 as the first autoload filter for every namespace
            $this->register_autoload_filter( $namespace, array( $this, "PSR_0" ) );
        }
    }
314441
public static function register_styles( $path, $prefix = '', $version = null, $screen = 'all' ) {
		$function = function() use ( $path, $prefix, $version, $screen ) {
			foreach ( self::parse_dir( $path, 'css', $prefix ) as $handle => $data ) {
				if ( is_null( $version ) ) {
					$this_version = filemtime( $data['path'] );
				} else {
					$this_version = $version;
				}
				wp_register_style( $handle, $data['url'], $data['deps'], $this_version, $screen );
			}
		};
		if ( did_action( 'init' ) ) {
			$function();
		} else {
			add_action( 'init', $function );
		}
	}
1090027
public function removePrefixPath($prefix, $path = null)
    {
        $prefix = $this->_formatPrefix($prefix);
        if ($this->_useStaticRegistry) {
            $registry =& self::$_staticPrefixToPaths[$this->_useStaticRegistry];
        } else {
            $registry =& $this->_prefixToPaths;
        }

        if (!isset($registry[$prefix])) {

            throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.');
        }

        if ($path != null) {
            $pos = array_search($path, $registry[$prefix]);
            if (false === $pos) {

                throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' / Path ' . $path . ' was not found in the PluginLoader.');
            }
            unset($registry[$prefix][$pos]);
        } else {
            unset($registry[$prefix]);
        }

        return $this;
    }
742134
public function setPrefix($prefix)
    {
        $this->prefix = $prefix;

        if (!empty($this->prefix)) {
            $this->prefix .= ".";
        }
    }
806455
public function registerMap(array $maps)
    {
        foreach ($maps as $prefix => $library) {
            $endChar = substr($prefix, -1);
            if ($endChar == '_') {
                Loaders\Pear::getInstance()->registerMap($prefix, $library);
            } else {
                if (is_array($library)) {
                    if (isset($library['Psr']) && $library['Psr'] == '0') {
                        Loaders\Psr0::getInstance()->registerMap($prefix, $library);
                        continue;
                    }
                }

                Loaders\Psr4::getInstance()->registerMap($prefix, $library);
            }
        }
    }
116384
private function setDirectories($paths)
    {
        if (!empty($paths)) {
            foreach ($paths as $key => $dir) {
                $path = str_replace('.', DS, $dir);

                //Iterate through all paths and filter with extension provided
                $recursiveExtensionFilter = new FileExtensionFilter(
                    new \RecursiveDirectoryIterator($path)
                );

                // loop through the directory listing
                // we need to create a RecursiveIteratorIterator instance
                foreach ($recursiveExtensionFilter as $item) {
                    $alias = str_replace('.php', '', $item->getPathName());

                    $alias = implode('\\', array_map('ucfirst', explode(DS, $alias)));
                    if (!isset($this->directories[$alias])) {
                        $this->directories[str_replace('Src', '', $alias)] = str_replace('\\', '/', $item->getPathName());
                    }
                }
            }
        }
    }
799972
public function registerClasses($classes, $merge = true)
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            foreach ($classes as $key => $path) {
                $classes[$key] = strtr($path, '\\', '/');
            }
        }

        $this->_classes = $merge ? array_merge($this->_classes, $classes) : $classes;

        return $this;
    }
100747
private function doValidatePath($prefix, $path)
    {
        $subPath = $this->prependPathWithBaseDir($path);
        if (is_numeric($prefix)) {
            $this->report->error(new NameSpaceInvalidViolation($this->getName(), $prefix, $path));

            return;
        }

        if ($prefix && '\\' !== substr($prefix, -1)) {
            $this->report->error(new NamespaceMustEndWithBackslashViolation($this->getName(), $prefix, $path));

            return;
        }

        $classMap = $this->classMapFromPath($subPath);
        if (empty($classMap)) {
            $this->report->error(
                new NoClassesFoundInPathViolation($this->getName(), $prefix, $path)
            );

            return;
        }

        $this->validateClassMap($classMap, $subPath, $prefix);
    }
306256
public function setPaths($paths)
    {
        if (!is_array($paths) && !$paths instanceof Traversable) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Invalid argument provided for $paths, expecting either an array or Traversable object, "%s" given',
                is_object($paths) ? get_class($paths) : gettype($paths)
            ));
        }

        $this->clearPaths();
        $this->addPaths($paths);
    }
876134
public function addRoutes($routes = array())
    {
        if (!$this->isRegistered()) {
            $this->registerWordpressAction();
        }

        $this->route->addPossibilities($routes);
    }
364313
public function setPaths($paths, $namespace = self::DEFAULT_NAMESPACE)
    {
        if (! is_array($paths)) {
            $paths = [$paths];
        }
        $this->paths[$namespace] = [];
        foreach ($paths as $path) {
            $this->addPath($path, $namespace);
        }
    }
419308
public function addPaths(array $paths, $clearCache = true, $group = '__DEFAULT__')
	{
		array_map([$this, 'addPath'], $paths, [[$clearCache, $group]]);
	}
1038664
protected function resetBinds($prefix = null)
    {
        if ($prefix === null) {
            $this->builder->setParameters([]);

            return;
        }

        $params = (array) $this->builder->getParameters();
        $types = (array) $this->builder->getParameterTypes();

        foreach (array_keys($params) as $key) {
            if (strpos($key, $prefix) === 1) {
                unset($params[$key], $types[$key]);
            }
        }

        $this->builder->setParameters($params, $types);
    }
437027
public function addPaths(array $paths)
    {
        $this->currentCollectorData = $this->filePathCollector->collect();

        foreach ($paths as $path) {
            $this->addPath($path);
        }
    }
1354662
public function setPrefix($prefix)
    {
        $this->publishedIOService->setPrefix($prefix);
        $this->draftIOService->setPrefix($prefix);
    }
950054
public function setPathPrefix($prefix)
	{
		$prefix = (string) $prefix;
		if ($prefix === '') {
			$this->pathPrefix = '';

			return;
		}

		$this->pathPrefix = \rtrim($prefix, '\\/') . $this->pathSeparator;
	}