Re: Global function in cakephp

2010-06-29 Thread Miles J
e tell me how to declare, define and call global > > function in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. T

Re: Global function in cakephp

2010-06-29 Thread DragonFlyEye
to the Controllers that need it. On Jun 29, 6:12 am, amol wrote: > Can anyone please tell me how to declare, define and call global > function in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this m

Global function in cakephp

2010-06-29 Thread amol
Can anyone please tell me how to declare, define and call global function in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP"

Re: Access Global Function in CakePHP

2010-02-11 Thread Mukhamad Ikhsan
$temp_var = __('String', true); $temp_var is not a function just a returned value, if a i calling many function __() with different value it can't be implemented like this i created javascript helper that intensively using string manipulation so curly string syntax is making easier and make a clea

Re: Access Global Function in CakePHP

2010-02-11 Thread Miles J
Not everything has to be OOP. Im still confused at what your trying to achieve. On Feb 10, 11:39 pm, Martin Westin wrote: > I can not imagine why you would use a localized variable variable. > Anyway... > > $temp_var = __('String',true); > echo "{${$temp_var}}"; > > On Feb 11, 8:14 am, Mukhamad I

Re: Access Global Function in CakePHP

2010-02-10 Thread Martin Westin
I can not imagine why you would use a localized variable variable. Anyway... $temp_var = __('String',true); echo "{${$temp_var}}"; On Feb 11, 8:14 am, Mukhamad Ikhsan wrote: > global function like __() is break the OOP concept, in some cases i need the > function bind to an object > > case:

Access Global Function in CakePHP

2010-02-10 Thread Mukhamad Ikhsan
global function like __() is break the OOP concept, in some cases i need the function bind to an object case: echo "{${$someobject->__('String')}}" // This will work echo "{${__('String')}} // this will not work because curly syntax after ${ is looking the variable object not a function, even in p