Create a new instance of server.
@param STRING $id server ID
@return wnModule the module instance, false if the module is disabled or does not exist.
175272
function (id)
		{
			var m = this.getModule('server-'+id, function (server) {
				self.e.loadServer(server);
			});
			_serverModules.push(m);
			return m;
		}
994476
public function loadHelper($id) {
		if (empty($this->_loaders)) {
			throw new NoLoaders('Wasn\'t a loaders registered');
		}
		
		foreach ($this->_loaders as $loader) {
			$helper = $loader->load($id);
			
			if ($helper !== null) {
				return $helper;
			}
		}
		
		throw new NoHelper('Unable to load helper "' . $id . '"');
	}
543919
public function findModule($id)
    {
        if (($controller = $this->getController()) !== null && ($module = $controller->getModule()) !== null) {
            do {
                if (($m = $module->getModule($id)) !== null) {
                    return $m;
                }
            } while (($module = $module->getParentModule()) !== null);
        }
        if (($m = $this->getModule($id)) !== null) {
            return $m;
        }
    }
954888
public function getModuleConfiguration(string $moduleId) : ModuleConfiguration
    {
        if (array_key_exists($moduleId, $this->moduleConfigurations)) {
            return $this->moduleConfigurations[$moduleId];
        }
        throw new DomainException('There is no module configuration with id ' . $moduleId);
    }
772622
public function store($id)
    {
        $this->repo->createOrUpdate(
            $id,
            $this->instanceName,
            json_encode(serialize([
                'content' => $this->content,
                'coupons' => $this->coupons,
            ]))
        );

        return $this;
    }
164667
function (id,server)
		{
			if (!_.isString(id) || !_.isObject(server))
				return false;

			if (this.hasModule('server-'+id) && server == null)
				delete this.getModule('server-'+id);
			else
				this.setModule('server-'+id,server);
		}
483688
public function getModule($id)
    {
        foreach ($this->registry->getMap() as $module) {
            if ($module['id'] == $id) {
                return $this->loadModule($module);
            }
        }
        return null;
    }
706540
protected function getNewUploadModel($id = null)
    {
        $uploadModel = $this->modelName();

        $upload = new $uploadModel;

        if ( ! $upload instanceof Uploadable)
        {
            throw new RuntimeException('The upload model must implement the "Kenarkose\Transit\Contract\Uploadable" interface.');
        }

        if ($id)
        {
            $upload->setKey($id);
        }

        return $upload;
    }
1012069
public function client($id)
    {
        if (isset($this->clients[$id])) {
            return $this->clients[$id];
        }

        return new Client($this, $id);
    }
1014591
public function copy($id)
    {
        $uriAppend = 'copy/' . $id;

        $response = $this->handler->handle('POST', false, $uriAppend);

        return $this->make($response, false);
    }
36056
public function setModelId($id)
    {
        if (is_array($id)) {
            $this->modelId = $id;
        } else {
            $this->modelId = [$id];
        }

        // rebuild the model instance with ID
        if ($this->model) {
            $model = (is_object($this->model)) ? get_class($this->model) : $this->model;

            $this->model = new $model($id);
        }

        return $this;
    }
342811
public function make($id, $usingNamespace = false)
    {
        if ($usingNamespace) {
            return $this->factory->resolveAndCreate($id, $this);
        }

        return $this->factory->create($id, $this);
    }
563927
public function create($buildSid) {
        $data = Values::of(array('BuildSid' => $buildSid, ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new DeploymentInstance(
            $this->version,
            $payload,
            $this->solution['serviceSid'],
            $this->solution['environmentSid']
        );
    }
612874
static function instance( $id, $load = false ) {
            if ( ! isset( self::$_instances[ $id ] ) ) {
                self::$_instances[ $id ] = new FS_Options( $id, $load );
            }

            return self::$_instances[ $id ];
        }
508790
public function setDatatableId($id)
    {
        if (!array_key_exists($id, self::$instances)) {
            self::$instances[$id] = $this;
        } else {
            throw new \Exception('Identifer already exists');
        }

        return $this;
    }
892079
public function worker($serverId, $siteId, $workerId)
    {
        return new Worker(
            $this->get("servers/$serverId/sites/$siteId/workers/$workerId")['worker']
            + ['server_id' => $serverId, 'site_id' => $siteId], $this
        );
    }
709736
public function server($id = null, $scopes = []) {
        $server = new Server($this);

        if (is_null($id)) {
            return $server;
        }

        return $server->find($id, $scopes);
    }