Composer\Autoload\ClassLoader::addPsr4
Registers a set of PSR-4 directories for a given namespace, either appending or prepending to the ones previously set for this namespace.
Signature
public function addPsr4(string
$prefix,
array|string
$paths,
[boolean
$prepend = false] )
Parameters
$prefix
—
string
- The prefix/namespace, with trailing '\\'
$paths
—
object
- The PSR-4 base directories
$prepend
—
boolean
- Whether to prepend the directories
Errors/Exceptions
-
InvalidArgumentException