public static function create(User $user, $domainName, $bandwidthLimit = null, $diskLimit = null, $ssl = null, $php = null, $cgi = null)
    {
        $options = [
            'action' => 'create',
            'domain' => $domainName,
            (isset($bandwidthLimit) ? 'bandwidth' : 'ubandwidth') => $bandwidthLimit,
            (isset($diskLimit) ? 'quota' : 'uquota') => $diskLimit,
            'ssl' => Conversion::onOff($ssl, $user->hasSSL()),
            'php' => Conversion::onOff($php, $user->hasPHP()),
            'cgi' => Conversion::onOff($cgi, $user->hasCGI()),
        ];
        $user->getContext()->invokeApiPost('DOMAIN', $options);
        $config = $user->getContext()->invokeApiGet('ADDITIONAL_DOMAINS');
        return new self($domainName, $user->getContext(), $config[$domainName]);
    }
public static function create(User $user, $domainName, $bandwidthLimit = null, $diskLimit = null, $ssl = null, $php = null, $cgi = null)
    {
        $options = [
            'action' => 'create',
            'domain' => $domainName,
            (isset($bandwidthLimit) ? 'bandwidth' : 'ubandwidth') => $bandwidthLimit,
            (isset($diskLimit) ? 'quota' : 'uquota') => $diskLimit,
            'ssl' => Conversion::onOff($ssl, $user->hasSSL()),
            'php' => Conversion::onOff($php, $user->hasPHP()),
            'cgi' => Conversion::onOff($cgi, $user->hasCGI()),
        ];
        $user->getContext()->invokeApiPost('DOMAIN', $options);
        $config = $user->getContext()->invokeApiGet('ADDITIONAL_DOMAINS');
        return new self($domainName, $user->getContext(), $config[$domainName]);
    }
public static function create ( User $ user , $ domainName , $ bandwidthLimit = null , $ diskLimit = null , $ ssl = null , $ php = null , $ cgi = null ) { $ options = [ 'action' => 'create' , 'domain' => $ domainName , ( isset ( $ bandwidthLimit ) ? 'bandwidth' : 'ubandwidth' ) => $ bandwidthLimit , ( isset ( $ diskLimit ) ? 'quota' : 'uquota' ) => $ diskLimit , 'ssl' => Conversion :: onOff ( $ ssl , $ user -> hasSSL ( ) ) , 'php' => Conversion :: onOff ( $ php , $ user -> hasPHP ( ) ) , 'cgi' => Conversion :: onOff ( $ cgi , $ user -> hasCGI ( ) ) , ] ; $ user -> getContext ( ) -> invokeApiPost ( 'DOMAIN' , $ options ) ; $ config = $ user -> getContext ( ) -> invokeApiGet ( 'ADDITIONAL_DOMAINS' ) ; return new self ( $ domainName , $ user -> getContext ( ) , $ config [ $ domainName ] ) ; }
Creates a new domain under the specified user.

@param User $user Owner of the domain
@param string $domainName Domain name to create
@param float|null $bandwidthLimit Bandwidth limit in MB, or NULL to share with account
@param float|null $diskLimit Disk limit in MB, or NULL to share with account
@param bool|null $ssl Whether SSL is to be enabled, or NULL to fallback to account default
@param bool|null $php Whether PHP is to be enabled, or NULL to fallback to account default
@param bool|null $cgi Whether CGI is to be enabled, or NULL to fallback to account default
@return Domain The newly created domain
Creates a new domain under the specified user .