Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias for instance variables?

Is there a way to create aliases for instance variables (not talking about db alias attributes) other than assigning it to another instance var?

For ex:

@imavar

alias_attribute(@hesavar, @imavar)
like image 635
keruilin Avatar asked Jun 26 '10 22:06

keruilin


1 Answers

You can alias getter methods instead.

like image 89
Eimantas Avatar answered Oct 12 '22 22:10

Eimantas