• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get model function name

#1
[eluser]l1v1[/eluser]
Hi guys, so I need to get the model function name. For example:

Code:
class some_model extends CI_Model{

public function validate_contacts() {
$function_name = 'validate_contacts'; // how to do this automatic by not typing it manually?
$this->create_system_message($function_name, 'required');
$this->create_system_message($function_name, 'blablabla');
  /* ... other code ... */
}

}

#2
[eluser]Aken[/eluser]
__METHOD__

http://php.net/manual/en/language.consta...efined.php

#3
[eluser]l1v1[/eluser]
Thank you, didn't think it is so easy Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.