Código PHP:
$Objetc = new unObjeto();
$Object->setAlgo(1)->setOtraCosa(2)->setUnaCosaMas(3);
Ejemplo:
Código PHP:
public function find($id, Application_Model_Guestbook $guestbook)
{
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
}
$row = $result->current();
$guestbook->setId($row->id)
->setEmail($row->email)
->setComment($row->comment)
->setCreated($row->created);
}
Error: Fatal error: Call to a member function setEmail() on a non-object in...
Ahora si lo hago como en php4 funciona todo perfecto, ejemplo:
Código PHP:
public function find($id, Application_Model_Guestbook $guestbook)
{
$result = $this->getDbTable()->find($id);
if (0 == count($result)) {
return;
}
$row = $result->current();
$guestbook->setId($row->id)
$guestbook->setEmail($row->email)
$guestbook->setComment($row->comment)
$guestbook->setCreated($row->created);
}