Loads the installed towers.

@returns {Tower[]} The loaded towers.
971178
function loadTowers() {
  const internalTowersInfo = getInternalTowersInfo();
  const externalTowersInfo = getExternalTowersInfo();
  return uniqBy(internalTowersInfo.concat(externalTowersInfo), 'id').map(
    ({ id, requirePath }) => {
      const { name, description, levels } = require(requirePath); // eslint-disable-line global-require, import/no-dynamic-require
      return new Tower(id, name, description, levels);
    },
  );
}
386032
function load() {
		Object.keys(envs).forEach(function(envName) {
			environments[envName] = envs[envName];
		});
	}
1172130
function loadImportBases(callback) {
            var needed = [],
                error = null,
                stillToGo = 0,
                i,
                guids = updatedLibraryJson.bases || {},
                root = core.getRoot(originLibraryRoot),
                guidList = Object.keys(guids),
                baseLoaded = function (err) {
                    error = error || err;
                    if (--stillToGo === 0) {
                        callback(error);
                    }
                },
                loadBase = function (guid, path) {
                    core.loadByPath(root, path, function (err, node) {
                        if (err) {
                            return baseLoaded(err);
                        }
                        if (core.getGuid(node) !== guid) {
                            return baseLoaded('GUID mismatch');
                        }

                        nodes[guid] = node;
                        baseLoaded(null);
                    });
                };

            for (i = 0; i < guidList.length; i++) {
                if (nodes[guidList[i]] === undefined) {
                    needed.push(guidList[i]);
                }
            }

            if (needed.length > 0) {
                stillToGo = needed.length;
                for (i = 0; i < needed.length; i++) {
                    loadBase(needed[i], guids[needed[i]]);
                }
            } else {
                callback(null);
            }

        }
496884
function() {
   
      var i;
      var obj = {containers: [], wires: []};
   
      for( i = 0 ; i < this.containers.length ; i++) {
         obj.containers.push( this.containers[i].getConfig() );
      }
   
      for( i = 0 ; i < this.wires.length ; i++) {
         var wire = this.wires[i];
      	var wireObj = wire.getConfig();
			wireObj.src = {moduleId: WireIt.indexOf(wire.terminal1.container, this.containers), terminal: wire.terminal1.name };
			wireObj.tgt = {moduleId: WireIt.indexOf(wire.terminal2.container, this.containers), terminal: wire.terminal2.name };
         obj.wires.push(wireObj);
      }
   
      return obj;
   }
1162202
function loadResources() {
        var resources = {};
        var resourcesDir = path.join(this.injector.rootDir, this.injector.servicesDir + '/resources');


        if (!fs.existsSync(resourcesDir)) {
            return resources;
        }

        var me = this;
        var resourceNames = fs.readdirSync(resourcesDir);

        _.each(resourceNames, function (resourceName) {
            if (resourceName.substring(resourceName.length - 3) !== '.js') {  // only dirs, not js files
                resources[resourceName] = me.injector.loadModule(utils.getCamelCase(resourceName + '.resource'));
            }
        });

        return resources;
    }
547894
public Class[] getLoadedClasses() {
        synchronized (classCache) {
            final Collection<Class> values = classCache.values();
            return values.toArray(new Class[values.size()]);
        }
    }
1001350
function loadDefault() {
  return {
    port: 8000,
    host: '127.0.0.1',
    root: './',
    logFormat: 'combined',
    middlewares: [
      {
        name: 'cors',
        cfg: {
          origin: true
        }
      },
      {
        name: 'morgan',
        cfg: {}
      },
      {
        name: 'serveStatic',
        cfg: {}
      },
      {
        name: 'serveIndex',
        cfg: {
          icons: true
        }
      }
    ]
  }
}
1209679
function loadControllers() {
  
  // Note: runs on app context
  
  // Get controllers/
  var cpath = this.mvcpath + 'controllers/',
      files = protos.util.getFiles(cpath);

  // Create controllers and attach to app
  var controllerCtor = protos.lib.controller;
  for (var controller, key, file, instance, className, Ctor, i=0; i < files.length; i++) {
    file = files[i];
    key = file.replace(this.regex.jsFile, '');
    className = file.replace(this.regex.jsFile, '');
    Ctor = protos.require(cpath + className, true); // Don't use module cache (allow reloading)
    Ctor = createControllerFunction.call(this, Ctor);
    instance = new Ctor(this);
    instance.className = instance.constructor.name;
    this.controllers[key.replace(/_controller$/, '')] = instance;
  }

  this.controller = this.controllers.main;
  
  this.emit('controllers_loaded', this.controllers);

}
1192848
function loadResources (styleArray) {
  const publicPath = '/public';
  var results = {};
  for (let source of styleArray) {
    if (source.resources) {
      for (let category in source.resources) {
        if (source.resources.hasOwnProperty(category)) {
          if (!results.hasOwnProperty(category)) {
            results[category] = {};
          }
          for (let item in source.resources[category]) {
            results[category][item] = source.resources[category][item];
            results[category][item].dataPromise = new Promise(resolve => {
              getJSON(publicPath + results[category][item].src)
                .then(data => {
                  resolve(data);
                });
            });
          }
        }
      }
    }
  }
  return results;
}
1025288
function getTasksFromArray(cfgArray)
{
    const tc = TC.TaskCollection();
    // tasks are defined in a datascripture - load it
    const tc2 = TASKS.loadTasksFromArray(cfgArray, tc);
    //this time the preloads come after the custom tasks - could have done it the other way round
    const collection = TASKS.loadPreloadedTasks(tc2);
    return collection;
}
121639
function getPackagesTasks(baseTask) {
	var packages = getPackages();
	var tasks = [];

	for (index = 0; index < packages.length; ++index) {
	    tasks.push(baseTask + '.' + packages[index]);
	}

	return tasks;
}
411993
function getTallest(elements) {
  let tallest = 0;

  for (let i = elements.length - 1; i >= 0; i--) {
    if (elements[i].offsetHeight > tallest) {
      tallest = elements[i].offsetHeight;
    }
  }

  return tallest;
}
1318237
function() {
    var roots = [];
    
    for (var i=0; i < this.nodes.length; i++) {
      var node = this.nodes[i];
      
      if (node.parent == undefined) roots.push(node);
    };
    
    return roots;
  }
783227
public List<LanguageProfile> readAllBuiltIn() throws IOException {
        List<LanguageProfile> loaded = new ArrayList<>();
        for (LdLocale locale : BuiltInLanguages.getLanguages()) {
            loaded.add(readBuiltIn(locale));
        }
        return loaded;
    }
1235648
function loadModulePlugins(modulePlugins) {
        var serverModules = {};
        var me = this;

        // add modules from each plugin to the serverModules map
        _.each(modulePlugins, function (modulePlugin) {
            _.extend(serverModules, me.loadModules(modulePlugin.rootDir, modulePlugin.serverModuleDirs));
        });

        return serverModules;
    }
1308593
function getBrackets() {
  const type = NodeType.BracketsType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const right = token.right;
  let content = [];

  // Skip `[`.
  pos++;

  if (pos < right) {
    content = getTsets();
  }

  const end = getLastPosition(content, line, column, 1);

  // Skip `]`.
  pos++;

  return newNode(type, content, line, column, end);
}
148588
public function load()
    {
        $path = $this->manifestPath.'/collections.json';

        if ($this->files->exists($path) and is_array($manifest = json_decode($this->files->get($path), true)))
        {
            foreach ($manifest as $key => $entry)
            {
                $entry = new Entry($entry['fingerprints'], $entry['development']);

                $this->entries->put($key, $entry);
            }
        }
    }