protected function registerModule($moduleName, \OtherCode\Rest\Modules\BaseModule $moduleInstance, $hook)
    {
        if (!in_array($hook, array_keys($this->modules))) {
            return false;
        }
        if (!array_key_exists($moduleName, $this->modules[$hook])) {
            $this->modules[$hook][$moduleName] = $moduleInstance;
            return true;
        }
        return false;
    }
protected function registerModule($moduleName, \OtherCode\Rest\Modules\BaseModule $moduleInstance, $hook)
    {
        if (!in_array($hook, array_keys($this->modules))) {
            return false;
        }
        if (!array_key_exists($moduleName, $this->modules[$hook])) {
            $this->modules[$hook][$moduleName] = $moduleInstance;
            return true;
        }
        return false;
    }
protected function registerModule ( $ moduleName , \ OtherCode \ Rest \ Modules \ BaseModule $ moduleInstance , $ hook ) { if ( ! in_array ( $ hook , array_keys ( $ this -> modules ) ) ) { return false ; } if ( ! array_key_exists ( $ moduleName , $ this -> modules [ $ hook ] ) ) { $ this -> modules [ $ hook ] [ $ moduleName ] = $ moduleInstance ; return true ; } return false ; }
Register a new module instance
@param string $moduleName
@param \OtherCode\Rest\Modules\BaseModule $moduleInstance
@param string $hook
@return boolean
Register a new module instance