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

How do you access the $this bound data of the controller in the view? Ci3 is OK, ci4 doesn't seem to work #775

Closed
jinmarcus opened this issue Oct 13, 2017 · 4 comments

Comments

@jinmarcus
Copy link

How do you access the $this bound data of the controller in the view? Ci3 is OK, ci4 doesn't seem to work

@jinmarcus
Copy link
Author

jinmarcus commented Oct 13, 2017

such as ci3's get_instance()

I can use the global $this anywhere in the controller, model, view in CI3, but ci4, I can't use the global $this in the view, the model, which worries me

@jaynarayan89
Copy link
Contributor

get_instance is not available because there is no "super object" aka singleton is present in ci4. In my humble opinion this is not a bug and you should take your question to the ci4 forum.

@jinmarcus
Copy link
Author

The feedback from the forum is a bit slow

https://forum.codeigniter.com/thread-69145.html

@jim-parry
Copy link
Contributor

THis was a design decision early in the CI4 development. This is a feature, not a bug.
If you wish to argue for it, the forum is the proper place, slow or not.

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

No branches or pull requests

3 participants