Want to create a custom function
问题 I am working on a CakePHP 2.x .. I want to create a special class in which I want to create functions so that I can call functions from other controllers. For example this function function replace_dashes($string) { $string = str_replace("-", " ", $string); return $string; } So whenever I want to use that function in some other controller I can call this or can pass parameters too ... I want to implement all the raw functions like this in some class. How can I do this in CakePHP? 回答1: Its not