Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this handle global functions? #148

Closed
alessandrotesoro opened this issue Apr 3, 2020 · 1 comment
Closed

Can this handle global functions? #148

alessandrotesoro opened this issue Apr 3, 2020 · 1 comment
Labels

Comments

@alessandrotesoro
Copy link

Hi there, I'm looking at ways to prefix one specific package in my project. The package also brings it's own global functions that are all prefixed with "tr_", they're not functions that have been namespaced. So ideally I'd like to "prefix the prefix" eg: from "tr_" to "new_tr_".

Can Imposter also prefix global functions or is it only restricted to classes?

Thank you :)

@tangrufus
Copy link
Member

tangrufus commented Apr 14, 2020

No, functions, both global and namespeced, are not supported.

Reason: imposter's ulgy regex cannot distingish class methods and functions:

function my_function() {}

class ABC
{
    function my_method() {}
}

If #101 is implemented, we might able to support namespeced functions.

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

No branches or pull requests

2 participants