Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
CodeIgniter 4
CodeIgniter 4 Support
how to get current class and method
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
how to get current class and method
Wong
Newbie
Posts:
8
Threads:
4
Joined:
Nov 2014
Reputation:
0
#1
12-17-2017, 08:22 PM
Hi,
I use $this->router->class and $this->router->method to get name of class and method in CI3.
How to get name of class and method in CI4.
Thank you.
Reply
kilishan
CI Project Lead
Posts:
1,464
Threads:
91
Joined:
Oct 2014
Reputation:
122
#2
12-17-2017, 09:39 PM
controllerName() and methodName() are the new methods.
Support Development
•
CodeIgniter 4 Foundations
•
Practical CodeIgniter 3
•
CodeIgniter Tutorials
Reply
Wong
Newbie
Posts:
8
Threads:
4
Joined:
Nov 2014
Reputation:
0
#3
12-17-2017, 10:58 PM
(12-17-2017, 09:39 PM)
kilishan Wrote:
controllerName() and methodName() are the new methods.
Thank you very much
Reply
InsiteFX
Super Moderator
Posts:
6,744
Threads:
346
Joined:
Oct 2014
Reputation:
247
#4
12-18-2017, 04:11 AM
@
kilishan
Can we please get this added to the User Guide to save having to answer it again?
Thank you
What did you Try?
What did you Get?
W
hat did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Reply
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB