src/ArunCore/Core/CodeBuilders/DomainManipulator.php
public function createDomain(string $domainName, string $synopsis, string $enabledString, bool $force = false): bool
    {
        $domainClassName = DomainActionNameGenerator::getDomainClassName($domainName);

        $domainSchemaCode = $this->fileMan->loadSchemaCode("Domain");

        $this->generatingDomainMsg($domainName);

        if ($domainSchemaCode != null) {

            if ($enabledString == "false") {
                $this->domainGeneratedAsDisabledMsg();
            }

            $this->setSynopsisMsg($synopsis);

            $this->replaceParam("DOMAINNAME", $domainClassName, $domainSchemaCode);
            $this->replaceParam("SYNOPSIS", $synopsis, $domainSchemaCode);
            $this->replaceParam("ENABLED", $enabledString, $domainSchemaCode);

            $isStored = $this->fileMan->storeDomainCode($domainName, $domainSchemaCode, $force);

            if ($isStored) {
                $this->domainCreatedMsg($domainClassName);
                return true;
            }

            $this->domainNotCreatedMsg($domainClassName);
            return false;
        }

        $this->schemaNotFoundMsg($domainName);
        return false;
    }
public function createDomain(string $domainName, string $synopsis, string $enabledString, bool $force = false): bool
    {
        $domainClassName = DomainActionNameGenerator::getDomainClassName($domainName);

        $domainSchemaCode = $this->fileMan->loadSchemaCode("Domain");

        $this->generatingDomainMsg($domainName);

        if ($domainSchemaCode != null) {

            if ($enabledString == "false") {
                $this->domainGeneratedAsDisabledMsg();
            }

            $this->setSynopsisMsg($synopsis);

            $this->replaceParam("DOMAINNAME", $domainClassName, $domainSchemaCode);
            $this->replaceParam("SYNOPSIS", $synopsis, $domainSchemaCode);
            $this->replaceParam("ENABLED", $enabledString, $domainSchemaCode);

            $isStored = $this->fileMan->storeDomainCode($domainName, $domainSchemaCode, $force);

            if ($isStored) {
                $this->domainCreatedMsg($domainClassName);
                return true;
            }

            $this->domainNotCreatedMsg($domainClassName);
            return false;
        }

        $this->schemaNotFoundMsg($domainName);
        return false;
    }
public function createDomain ( string $ domainName , string $ synopsis , string $ enabledString , bool $ force = false ) : bool { $ domainClassName = DomainActionNameGenerator :: getDomainClassName ( $ domainName ) ; $ domainSchemaCode = $ this -> fileMan -> loadSchemaCode ( "Domain" ) ; $ this -> generatingDomainMsg ( $ domainName ) ; if ( $ domainSchemaCode != null ) { if ( $ enabledString == "false" ) { $ this -> domainGeneratedAsDisabledMsg ( ) ; } $ this -> setSynopsisMsg ( $ synopsis ) ; $ this -> replaceParam ( "DOMAINNAME" , $ domainClassName , $ domainSchemaCode ) ; $ this -> replaceParam ( "SYNOPSIS" , $ synopsis , $ domainSchemaCode ) ; $ this -> replaceParam ( "ENABLED" , $ enabledString , $ domainSchemaCode ) ; $ isStored = $ this -> fileMan -> storeDomainCode ( $ domainName , $ domainSchemaCode , $ force ) ; if ( $ isStored ) { $ this -> domainCreatedMsg ( $ domainClassName ) ; return true ; } $ this -> domainNotCreatedMsg ( $ domainClassName ) ; return false ; } $ this -> schemaNotFoundMsg ( $ domainName ) ; return false ; }
Create a domain class

@param string $domainName
@param string $synopsis
@param string $enabledString
@param bool $force

@return bool
Create a domain class