ClassFinder.php
public function setComposerAutoload(string $packageName, array $autoload): self
    {
        $this->reset();

        if (isset($autoload['psr-0'])) {
            $this->addPsr0($packageName, (array) $autoload['psr-0']);
        }

        if (isset($autoload['psr-4'])) {
            $this->addPsr4($packageName, (array) $autoload['psr-4']);
        }

        if (isset($autoload['classmap'])) {
            $this->addClassmap($packageName, (array) $autoload['classmap']);
        }

        if (isset($autoload['exclude-from-classmap'])) {
            $this->setExcludes((array) $autoload['exclude-from-classmap']);
        }

        return $this;
    }
public function setComposerAutoload(string $packageName, array $autoload): self
    {
        $this->reset();

        if (isset($autoload['psr-0'])) {
            $this->addPsr0($packageName, (array) $autoload['psr-0']);
        }

        if (isset($autoload['psr-4'])) {
            $this->addPsr4($packageName, (array) $autoload['psr-4']);
        }

        if (isset($autoload['classmap'])) {
            $this->addClassmap($packageName, (array) $autoload['classmap']);
        }

        if (isset($autoload['exclude-from-classmap'])) {
            $this->setExcludes((array) $autoload['exclude-from-classmap']);
        }

        return $this;
    }
public function setComposerAutoload ( string $ packageName , array $ autoload ) : self { $ this -> reset ( ) ; if ( isset ( $ autoload [ 'psr-0' ] ) ) { $ this -> addPsr0 ( $ packageName , ( array ) $ autoload [ 'psr-0' ] ) ; } if ( isset ( $ autoload [ 'psr-4' ] ) ) { $ this -> addPsr4 ( $ packageName , ( array ) $ autoload [ 'psr-4' ] ) ; } if ( isset ( $ autoload [ 'classmap' ] ) ) { $ this -> addClassmap ( $ packageName , ( array ) $ autoload [ 'classmap' ] ) ; } if ( isset ( $ autoload [ 'exclude-from-classmap' ] ) ) { $ this -> setExcludes ( ( array ) $ autoload [ 'exclude-from-classmap' ] ) ; } return $ this ; }
Set the composer.json file autoload key values.

@param string $packageName
@param array  $autoload

@return \Narrowspark\Automatic\Common\ClassFinder
Set the composer . json file autoload key values .