src/Core/Manifest/ModuleManifest.php
public function addModule($path)
    {
        $module = new Module($path, $this->base);
        $name = $module->getName();

        // Save if not already added
        if (empty($this->modules[$name])) {
            $this->modules[$name] = $module;
            return;
        }

        // Validate duplicate module
        $path = $module->getPath();
        $otherPath = $this->modules[$name]->getPath();
        if ($otherPath !== $path) {
            throw new LogicException(
                "Module {$name} is in two places - {$path} and {$otherPath}"
            );
        }
    }
public function addModule($path)
    {
        $module = new Module($path, $this->base);
        $name = $module->getName();

        // Save if not already added
        if (empty($this->modules[$name])) {
            $this->modules[$name] = $module;
            return;
        }

        // Validate duplicate module
        $path = $module->getPath();
        $otherPath = $this->modules[$name]->getPath();
        if ($otherPath !== $path) {
            throw new LogicException(
                "Module {$name} is in two places - {$path} and {$otherPath}"
            );
        }
    }
public function addModule ( $ path ) { $ module = new Module ( $ path , $ this -> base ) ; $ name = $ module -> getName ( ) ; // Save if not already added if ( empty ( $ this -> modules [ $ name ] ) ) { $ this -> modules [ $ name ] = $ module ; return ; } // Validate duplicate module $ path = $ module -> getPath ( ) ; $ otherPath = $ this -> modules [ $ name ] -> getPath ( ) ; if ( $ otherPath !== $ path ) { throw new LogicException ( "Module {$name} is in two places - {$path} and {$otherPath}" ) ; } }
Adds a path as a module

@param string $path
Adds a path as a module