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

Access to class methods and Properties #51

Open
1mahdimf opened this issue Mar 3, 2023 · 2 comments
Open

Access to class methods and Properties #51

1mahdimf opened this issue Mar 3, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@1mahdimf
Copy link
Contributor

1mahdimf commented Mar 3, 2023

سلام، میشه بجای فراخوانی

echo \WP_User_Mobile::instance()->Admin->method_name();

از __call و __callStatic استفاده کرد تا این شکلی فراخوانی بشه

echo (new WP_User_Mobile)->Admin()->method_name();

یا

echo \WP_User_Mobile::Admin()->method_name();

هم چنین امکان استفاده از فریمورک رو هم در قالب داشته باشیم. (البته الان میشه ولی مثل پلاگین براش بخشی اختصاص داده بشه)

@mehrshaddarzi
Copy link
Owner

mehrshaddarzi commented Mar 3, 2023

@1mahdimf
please push your pull request with example.
check __callStatic() with phpStorm software because we want to show all models reference in IDE.
Thanks

@mehrshaddarzi mehrshaddarzi added the help wanted Extra attention is needed label Mar 4, 2023
@1mahdimf
Copy link
Contributor Author

1mahdimf commented Mar 4, 2023

@mehrshaddarzi

ایده خودمو بصورت pr ارسال کردم، لطفا یک نگاهی بکنید و نتیجه رو اعلام کنید.
#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants