Get a port configuration
@param int $portId
@return \alphayax\freebox\api\v3\models\SwitchPort\Config
326836
public function getFromPortId( $portId){
        $service = sprintf( static::API_SWITCH_PORT_CONFIG, $portId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResult( models\SwitchPort\Config::class);
    }
222188
public function getPort(): ? int
    {
        if ( $this->port === null ) {
            return self::DEFAULT_PORTS[$this->scheme ?? ''] ?? null;
        }

        return $this->port;
    }
245310
public function getPortStatus()
    {
        $status = $this->portConfig;
        foreach ($status as &$value) {
            $value['fdcount'] = 0;
        }
        foreach (get_instance()->server->connections as $fd) {
            $port = get_instance()->getServerPort($fd);
            if (array_key_exists($port, $status)) {
                $status[$port]['fdcount']++;
            }
        }
        return $status;
    }
873171
public function getTransportConfig($storeId)
    {
        $config = [
            'port' => $this->getSmtpPort($storeId),
            'auth' => 'login',
            'username' => $this->getSmtpUsername($storeId),
            'password' => $this->getSmtpPassword($storeId),
            'ssl' => 'tls',
        ];

        if ($this->isDebugEnabled($storeId)) {
            $this->_logger->debug('Mail transport config : ' . implode(',', $config));
        }

        return $config;
    }
99933
public function withPort($port)
    {
        if ($port === null) {
            return $this->_clone('port', null);
        }

        if ($port < 1 || $port > 65535) {
            throw new InvalidArgumentException('Invalid port specified');
        }

        return $this->_clone('port', (int)$port);
    }
640026
public function getPort()
    {
        if (empty($this->port)) {
            if (array_key_exists($this->scheme, static::$defaultPorts)) {
                return static::$defaultPorts[$this->scheme];
            }
        }

        return $this->port;
    }
1321148
public function getCurrentHost($clusterId)
    {
        try {
            $resolver = $this->getResolver();
            $response = $resolver->query('cluster-' . $clusterId . '.mysql', 'CNAME');
            return $response->answer[0]->cname;
        } catch (\Net_DNS2_Exception $e) {
            return '';
        }
    }
77448
public function port($port = NULL)
	{
		if ($port !== NULL)
		{
			$this->_port = $port;
			return $this;
		}

		if ( ! $this->_port)
		{
			$this->_port = Network::ephimeral_port($this->host(), 4445, 5000);
		}

		return $this->_port;
	}
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);
    }
963628
public function getAllCapabilitiesForDevice($deviceID)
    {
        $devices      = array_reverse($this->getDeviceHierarchy($deviceID));
        $capabilities = array();

        foreach ($devices as $device) {
            /** @var $device \Wurfl\Device\ModelDeviceInterface */
            if (is_array($device->capabilities)) {
                $capabilities = array_merge($capabilities, $device->capabilities);
            }
        }
        $capabilities = array_diff_key($capabilities, array_flip(VirtualCapabilityProvider::getControlCapabilities()));

        return $capabilities;
    }
1109955
public function getServerHost(string $serverId)
    {
        if (!$this->hasServerConfiguration($serverId)) {
            return null;
        }

        return $this->configuration['connections'][$serverId]['server_host'];
    }
1274858
public function getById( $PortForwarding_id){
        $rest = $this->getService( self::API_NAT_REDIR . $PortForwarding_id);
        $rest->GET();

        return $rest->getResult( models\NAT\PortForwardingConfig::class);
    }
952735
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $configuration = $this->getConfigurationInstance();
        if ($configuration) {
            $container->addObjectResource($configuration);
        }

        return $configuration;
    }
839254
public function getServerConfiguration(string $serverId)
    {
        if (!$this->hasServerConfiguration($serverId)) {
            return array();
        }
        //====================================================================//
        //  Populate Servers Config From Parameters
        $configuration = $this->configuration['connections'][$serverId]['config'];
        //====================================================================//
        //  Complete Servers Config From Cache
        if ($this->configuration['cache']['enabled']) {
            $configuration = array_replace_recursive(
                $configuration,
                $this->getConnectorConfigurationFromCache($serverId)
            );
        }

        return $configuration;
    }
343181
public function list_portconf()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/list/portconf');

        return $this->process_response($response);
    }
1083981
public function deleteById( $PortForwardingId){
        $rest = $this->getService( self::API_NAT_REDIR . $PortForwardingId);
        $rest->DELETE();

        return $rest->getSuccess();
    }
403594
public function getPerimeterConfiguration($siteId)
    {
        $treeNodes = $this->nodeRepository->findTreeNode(
            $siteId,
            $this->contextManager->getSiteContributionLanguage(),
            NodeInterface::ROOT_PARENT_ID
        );

        return $this->getTreePerimeterConfiguration($treeNodes);
    }