Create a new Domain with the given Name.

@param  string $name The name of the Domain.
@param  string $returnPathDomain The custom Return-Path domain for the Sender Signature.
@return DynamicResponseModel
11356
function createDomain($name, $returnPathDomain = NULL) {
		$body = array();
		$body['name'] = $name;
		$body['returnPathDomain'] = $returnPathDomain;

		return new DynamicResponseModel($this->processRestRequest('POST', '/domains/', $body));
	}
825120
public function createDomain(
        $domainName,
        string $createdByUserId,
        string $createdReason = Tracking::UNKNOWN_REASON,
        $primaryDomain = null,
        $doFlush = false
    ) {
        if (empty($domainName)) {
            throw new DomainNotFoundException('Domain name is required.');
        }

        // Check if exists first
        if ($this->domainExists($domainName)) {
            throw new DuplicateDomainException(
                'Duplicate domains may not be created.'
            );
        }

        $domain = new \Rcm\Entity\Domain(
            $createdByUserId,
            $createdReason
        );
        $domain->setDomainName($domainName);

        if ($primaryDomain instanceof \Rcm\Entity\Domain) {
            $domain->setPrimary($primaryDomain);
        }

        $this->getEntityManager()->persist($domain);

        if ($doFlush) {
            $this->getEntityManager()->flush($domain);
        }

        return $domain;
    }
1149952
protected function addPortToDomain($domain)
    {
        if (in_array($this->request->getPort(), array('80', '443'))) {
            return $domain;
        }

        return $domain .':' .$this->request->getPort();
    }
348645
public static function create($name) {
    if (is_string($name)) {
      $name = NameNode::create($name);
    }
    /** @var ConstantNode $node */
    $node = new static();
    $node->addChild($name, 'constantName');
    return $node;
  }
748099
public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null)
    {
        [$this->path, $this->domain, $this->secure, $this->sameSite] = [$path, $domain, $secure, $sameSite];

        return $this;
    }
683638
public function create($name)
    {
        $this->checkName($name);

        $configuration = new Configuration();

        $configuration->setName($name);

        $configuration->setModel($this->getParameter($name, 'model'));
        $configuration->setForm($this->getParameter($name, 'form'));
        $configuration->setFormTemplate($this->getParameter($name, 'template.form'));
        $configuration->setRecipientTemplate($this->getParameter($name, 'template.recipient'));
        $configuration->setRecipient($this->getParameter($name, 'recipient'));
        $configuration->setConfirmTemplate($this->getParameter($name, 'template.confirm'));
        $configuration->setPageTemplate($this->getParameter($name, 'template.page'));
        $configuration->setFrom($this->getParameter($name, 'from'));
        $configuration->setSenderName($this->getParameter($name, 'sender_name'));
        $configuration->setSubject($this->getParameter($name, 'subject'));
        $configuration->setTranslationDomain($this->getParameter($name, 'translation_domain'));
        $configuration->setConfirmMail($this->getParameter($name, 'confirm_mail'));

        return $configuration;
    }
1248495
public function domain($domain = null)
    {
        if (is_null($domain)) {
            return $this->getDomain();
        }

        $this->action['domain'] = $domain;

        return $this;
    }
870687
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        if (is_null($this->cachedFileGateway)) {
            $this->cachedFileGateway = new FileGateway(
                $serviceLocator->get('prooph.link.fileconnector.file_type_adapter_manager'),
                $serviceLocator->get('prooph.link.fileconnector.filename_renderer'),
                $serviceLocator->get('prooph.link.app.location_translator')
            );
        }

        return $this->cachedFileGateway;
    }
1360326
public static function func(
            $returnsReference,
            $name,
            array $parameterExpressions
    ) {
        return new self(
                self::TYPE_FUNCTION,
                $returnsReference,
                null,
                null,
                null,
                $name,
                $parameterExpressions,
                null);
    }
309741
public function createApiDocs($domain)
    {
        ini_set('memory_limit', -1);
        ini_set('max_execution_time', -1);

        $type = $this->getRequest()->get('type') ?: ApiController::PSFS_DOC;
        $download = $this->getRequest()->get('download') ?: false;

        $module = $this->srv->getModules($domain);
        if(empty($module)) {
            return Router::getInstance()->httpNotFound(null, true);
        }
        switch (strtolower($type)) {
            case ApiController::SWAGGER_DOC:
                $doc = DocumentorService::swaggerFormatter($module);
                break;
            case ApiController::POSTMAN_DOC:
                $doc = ['Pending...'];
                break;
            default:
            case ApiController::HTML_DOC:
            case ApiController::PSFS_DOC:
                $doc = $this->srv->extractApiEndpoints($module);
                break;
        }

        ini_restore('max_execution_time');
        ini_restore('memory_limit');

        if($download && $type === ApiController::SWAGGER_DOC) {
            return $this->download(json_encode($doc), 'application/json', 'swagger.json');
        }
        if($type === ApiController::HTML_DOC) {
            return $this->render('documentation.html.twig', ["data" => json_encode($doc)]);
        }
        return $this->json($doc, 200);
    }
699079
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        if (isset($this->instances[$requestedName])) {
            return $this->instances[$requestedName];
        }

        /* @var $serviceLocator \Zend\ServiceManager\ServiceManager */
        $config  = $this->getConfig($serviceLocator);
        $params = $config[$requestedName];

        $port = isset($params['port']) ? ':' . $params['port'] : '';

        $connector = new ZendConnector(new XmlRpcClient('http://' . $params['host'] . $port . '/RPC2'));

        $connector->setCredentials($params['username'], $params['password']);

        $this->instances[$requestedName] = $supervisor = new Supervisor($connector);

        return $supervisor;
    }
45368
def create(self, create_missing=None):
        
        return Domain(
            self._server_config,
            id=self.create_json(create_missing)['id'],
        ).read()
703889
def create_domain(self,
		service_id, 
		version_number, 
		name, 
		comment=None):
		""""""
		body = self._formdata({
			"name": name,
			"comment": comment,

		}, FastlyDomain.FIELDS)
		content = self._fetch("/service/%s/version/%d/domain" % (service_id, version_number), method="POST", body=body)
		return FastlyDomain(self, content)
258246
@VisibleForTesting
    static Function<CronField, CronField> returnAlwaysExpression(final CronFieldName name) {
        return field -> new CronField(name, always(), FieldConstraintsBuilder.instance().forField(name).createConstraintsInstance());
    }
727695
def create_domain(self, name):
        
        args = {'name': name}
        resp = self.request_single('CreateDomain', args)

        return zobjects.Domain.from_dict(resp)
965761
public function getComponentPath($name, $domain = null)
    {
        $result = null;

        $identifier = $this->getComponentIdentifier($name, $domain);
        if(isset($this->_components[$identifier])) {
            $result = $this->_components[$identifier];
        }

        return $result;
    }
374303
public function getHelper($name)
    {
        if (empty($this->helpers[$name])) {
            $class = $this->findHelper($name);

            if ($class === false) {
                throw new \DomainException(sprintf('Helper: %s not found.', $name));
            }

            $this->helpers[$name] = new $class($this);
        }

        return $this->helpers[$name];
    }