Yes, it's possible to create an instance of another table class inside methods of another table class.
But if you have application work to do that involves multiple tables, it's better to design a class that encapsulates that application work, and use both tables from within it.
This is why it's inaccurate to call a table a model. Nowhere in the Zend_Db_Table
documentation does it call a table a model.
A model represents some part of your application, and it may involve multiple tables in order to do its work. A class that corresponds to your table is just a Table.
Decouple your models from your tables!
Re your comment: You're still thinking that a model extends Zend_Db_Table_Abstract
-- it doesn't!
A model is not a data access class, it's a unit of your application. It doesn't extend any part of the Zend Framework.
The relationship between model and table is HAS-A, not IS-A.
class MyRegistryModel // extends nothing
{
/**
* @var Zend_Db_Table_Abstract
*/
protected $_registryTable;
/**
* @var Zend_Db_Table_Abstract
*/
protected $_namesTable;
public function __construct()
{
$this->_registryTable = new RegistryTable();
$this->_namesTable = new NamesTable();
}
public function getDailyReport()
{
// use the tables as needed to build the report
}
}