Hi Fernando
You need to create a new Row object, say My_Db_Table_Row_Person, and
put protected $_rowClass = 'My_Db_Table_Row_Person' in your table
class.
Then in your row class:
class My_Db_Table_Row_Person extends Zend_Db_Table_Row
{
public function __get($columnName)
{
switch ($columnName) {
case 'name':
return $this->_data['nm_person'];
default:
return $this->_data[$columnName];
}
}
}
Now you can do $person->name.
Is there a quicker way?
- Neil
http://codecaine.co.zaOn Tue, Jul 1, 2008 at 11:26 PM, Fernando chucre
<
fernandochucre@...> wrote:
> Hello all,
>
> I Have the table Person with have a column call "nm_person". In the object
> Zend_Db_Table_Row I want call the column "nm_person" by "name". Anyone knows
> how I make it?
>
> --
> Fernando Chucre - LPIC-1
>
http://www.horizontesdigitais.com