Skip to content

Namespace function to make variables inside a namespace defenition. #21521

@remco-pc

Description

@remco-pc

Description

Well i have a framework which can handle multiple domains/subdomains inside a directory like /mnt/Domain/../Controller/Controller.php and inside that Controller there is a namespace like
namespace Domain/Www_example_com/Controller

Which can be handled by the autoloader.

But here it comes, my framework now has composer packages which can be installed inside a domain.

For example:
app install raxon/issue -frontend.host=... -backend.host=api...

<?php
namespace Domain\{{php.namespace.host(options('frontend.host'))}}\Application\Issue\Controller;

But the installation files then have no IDE support and this is currently done with my own scripting language.

Is there any reason why a namespace cannot contain a variable part like domain?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions