Wednesday, February 10, 2010

Access Global Function in CakePHP

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 php manual this should work but i have tried and it's not worked

but because __() is a global function, i don't know how to bind that function into a variable/object

--
Mukhamad Ikhsan
Y!id:ikhsan_only

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.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate