Pop\Loader\Autoloader::register PHP Method

register() public method

Register a namespace and directory location with the autoloader
public register ( string $namespace, string $directory ) : Autoloader
$namespace string
$directory string
return Autoloader
    public function register($namespace, $directory)
    {
        $this->prefixes[$namespace] = realpath($directory);
        return $this;
    }

Usage Example

Example #1
0
 public function testRegister()
 {
     $a = new Autoloader(false);
     $a->register('Pop', __DIR__ . '/../../../src');
     $this->assertInstanceOf('Pop\\Loader\\Autoloader', $a);
 }
All Usage Examples Of Pop\Loader\Autoloader::register