public function generate(): string
    {
        // Init the variable
        $config = '';

        foreach ($this->getParams() as $key => $value) {
            $config .= $key . ((\strlen($value) > 0) ? ' ' . $value : '') . "\n";
        }

        $certs = $this->getCerts();
        if (\count($certs) > 0) {
            $config .= "\n### Certificates\n";
            foreach ($this->getCerts() as $key => $value) {
                $config .= isset($value['content'])
                    ? "<$key>\n{$value['content']}\n</$key>\n"
                    : "$key {$value['path']}\n";
            }
        }

        $pushes = $this->getPushes();
        if (\count($pushes) > 0) {
            $config .= "\n### Networking\n";
            foreach ($this->getPushes() as $push) {
                $config .= 'push "' . $push . "\"\n";
            }
        }

        return $config;
    }
public function generate(): string
    {
        // Init the variable
        $config = '';

        foreach ($this->getParams() as $key => $value) {
            $config .= $key . ((\strlen($value) > 0) ? ' ' . $value : '') . "\n";
        }

        $certs = $this->getCerts();
        if (\count($certs) > 0) {
            $config .= "\n### Certificates\n";
            foreach ($this->getCerts() as $key => $value) {
                $config .= isset($value['content'])
                    ? "<$key>\n{$value['content']}\n</$key>\n"
                    : "$key {$value['path']}\n";
            }
        }

        $pushes = $this->getPushes();
        if (\count($pushes) > 0) {
            $config .= "\n### Networking\n";
            foreach ($this->getPushes() as $push) {
                $config .= 'push "' . $push . "\"\n";
            }
        }

        return $config;
    }
public function generate ( ) : string { // Init the variable $ config = '' ; foreach ( $ this -> getParams ( ) as $ key => $ value ) { $ config .= $ key . ( ( \ strlen ( $ value ) > 0 ) ? ' ' . $ value : '' ) . "\n" ; } $ certs = $ this -> getCerts ( ) ; if ( \ count ( $ certs ) > 0 ) { $ config .= "\n### Certificates\n" ; foreach ( $ this -> getCerts ( ) as $ key => $ value ) { $ config .= isset ( $ value [ 'content' ] ) ? "<$key>\n{$value['content']}\n</$key>\n" : "$key {$value['path']}\n" ; } } $ pushes = $ this -> getPushes ( ) ; if ( \ count ( $ pushes ) > 0 ) { $ config .= "\n### Networking\n" ; foreach ( $ this -> getPushes ( ) as $ push ) { $ config .= 'push "' . $ push . "\"\n" ; } } return $ config ; }
Generate config by parameters in memory

@return  string
Generate config by parameters in memory