Skip to content

::namespace #178

Open
Open
@thekid

Description

@thekid

How about using ::namespace for namespace resolution just like ::class?

Example:

<?php namespace de\thekid\dialog;

// Currently, using the dotted syntax
$api= new RestApi(new ResourcesIn('de.thekid.dialog.api'));

// The PHP way
$api= new RestApi(new ResourcesIn(__NAMESPACE__.'\\api'));

// Suggestion
$api= new RestApi(new ResourcesIn(api::namespace));

This would simply be emitted as ::class, which already does everything we want; however, using api::class in this place doesn't convey the intent correctly!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions