Adds a module name to the graph.

@param string $moduleName The module name.

@throws RuntimeException If the module name already exists.
505717
public function addModuleName($moduleName)
    {
        if (isset($this->moduleNames[$moduleName])) {
            throw new RuntimeException(sprintf(
                'The module "%s" was added to the graph twice.',
                $moduleName
            ));
        }

        $this->moduleNames[$moduleName] = true;
        $this->dependencies[$moduleName] = array();
    }
604289
public function rename($oldName, $newName)
    {
        if (! ftp_rename($this->session, $oldName, $newName)) {
            throw new \RuntimeException('Name can not be changed');
        }
        return true;
    }
1024683
public function addModule(Module $module)
    {
        $name = $module->getName();
        if (isset($this->modules[$name])) {
            throw new \LogicException(sprintf('Trying to register two modules with the same name "%s"', $name));
        }
        $this->view->addTemplatePath($module->getPath() . '/Resources/views');
        $this->modules[$name] = $module;
        
        return $this;
    }
193471
public function addNode(string $className): void
    {
        if (isset($this->nodes[$className])) {
            return;
        }

        $this->nodes[$className] = new DocumentGraphNode($className);
    }
533039
public function addImport(string $importName): NamespaceContext
    {
        $importName = \trim($importName, '\\');
        
        if (false !== ($offset = \strrpos($importName, '\\'))) {
            $this->imports[\strtolower(\substr($importName, $offset + 1))] = $importName;
        } else {
            $this->imports[\strtolower($importName)] = $importName;
        }
        
        return $this;
    }
1162058
public function addIndex($indexName) {
    if (is_array($indexName)) {
      $this->indexes = $indexName;
    } else {
      $this->indexes[] = $indexName;
    }
    $this->indexes = array_unique($this->indexes);
  }
795825
private function addComponent(string $name, Component $component) : void
    {
        if (isset($this->components[$name])) {
            throw new \RuntimeException(sprintf('Duplicate component name "%s"', $name));
        }

        $this->components[$name] = $component;
    }
1369813
public function add_component( array $args )
    {
        if(!array_key_exists('type', $args))
        {
            throw new \RuntimeException("Component configuration arrays must have a <b>type</b> argument");
        }

        $comp = ComponentFactory::create($args['type'], $args);

        $this->verify_name_uniqueness($comp);
        $this->components[] = $comp;
    }
412353
public function addSection( $sectionName )
	{
		if( !$this->usesSections() )
			throw new RuntimeException( 'Sections are disabled' );
		$lines		= FS_File_Reader::loadArray( $this->fileName );
		$lines[]	= "[".$sectionName."]";
		if( !in_array( $sectionName, $this->sections ) )
			$this->sections[] = $sectionName;
		$result		= FS_File_Writer::saveArray( $this->fileName, $lines );
		$this->read();
		return is_int( $result );
	}
90453
public function add($name)
    {
        $this->repository->setCurrentUser($this->repository->getUserService()->loadUser($this->adminID));
        $contentTypeService = $this->repository->getContentTypeService();

        $contentTypeGroupStruct = $contentTypeService->newContentTypeGroupCreateStruct($name);

        try {
            $contentTypeGroup = $contentTypeService->createContentTypeGroup($contentTypeGroupStruct);
            return $contentTypeGroup;
        } catch (UnauthorizedException $e) {
            throw new \RuntimeException($e->getMessage());
        } catch (InvalidArgumentException $e) {
            throw new \RuntimeException($e->getMessage());
        }
    }
831903
public function initialize()
    {
        $modules = $this->loader->getModules();

        if (empty($modules)) {
            throw new RuntimeException('No modules found. Initialization halted');
        } else {
            $this->loadAll($modules);
            $this->modules = $modules;

            // Validate on demand
            $this->validateCoreModuleNames();
        }
    }
483647
public function addConfiguration($name, array $config)
    {
        if(array_key_exists($name, $this->configs)) {
            throw new \RuntimeException(
                "Connection with given name already exists!"
            );
        }

        $this->configs[$name] = $config;
    }
1079247
protected function connect(string $connectionName): Connection
	{
		if(!isset($this->configurations[$connectionName]))
		{
			throw new RuntimeException(vsprintf('[ %s ] has not been defined in the database configuration.', [$connectionName]));
		}

		$config = $this->configurations[$connectionName];

		$driver = $this->normalizeDriverName(explode(':', $config['dsn'], 2)[0]);

		$compiler = $this->getQueryCompilerClass($driver);

		$helper = $this->getQueryBuilderHelperClass($driver);

		$connection = $this->getConnectionClass($driver);

		return new $connection($connectionName, $compiler, $helper, $config);
	}
1123592
public function addVariable($key, $value)
    {
        if (is_null($key) || ! is_string($key)) {
            throw new RuntimeException(sprintf('The key where to save your variable in the expression context is invalid. Got "%s".', $key));
        }

        $this->variables[$key] = $value;
    }
679926
public static function setChartRendererName($libraryName)
    {
        if (!in_array($libraryName, self::$chartRenderers)) {
            return false;
        }
        self::$chartRendererName = $libraryName;

        return true;
    }
836821
public function add(Module $module)
    {
        $this->modules[$module->getName()] = $module;

        if ($module instanceof RootModule) {
            $this->rootModule = $module;
        }
    }
1225191
function byModule($moduleName)
    {
        if (!$this->hasLoaded($moduleName))
            $this->loadModule($moduleName);

        return $this->_c__loadedModules[$moduleName];
    }