ClassLoader::register( bool $prepend = false )

Registers this instance as an autoloader.


Parameters Parameters

$prepend

(bool) (Optional) Whether to prepend the autoloader or not

Default value: false


Top ↑

Return Return

(void)


Top ↑

Source Source

File: libraries/lifterlms-cli/vendor/composer/ClassLoader.php

    public function register($prepend = false)
    {
        spl_autoload_register(array($this, 'loadClass'), true, $prepend);

        if (null === $this->vendorDir) {
            return;
        }

        if ($prepend) {
            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
        } else {
            unset(self::$registeredLoaders[$this->vendorDir]);
            self::$registeredLoaders[$this->vendorDir] = $this;
        }
    }

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.