class Accounts extends Zend_Db_Table_Abstract
--
Hector
On Fri, Dec 18, 2009 at 4:11 PM, monk.e.boy <john@teethgrinder.co.uk> wrote:
Thanks for the reply, how do they manage to make their example (
http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.dependent
) look so much nicer than mine?
I am very confused :(
monk.e.boy
--
Hector Virgen wrote:
>
> AFAIK there are no short model class names. In #findDependentRowset(), you
> must pass in the full class name or an instance of the class.
>
> If you want to save some keystrokes you can maybe build a model name
> action
> helper. Something like:
>
> class Default_Action_Helper_Model
> {
> public function direct($name)
> {
> return 'Default_Model_' . $name;
> }
> }
>
> --
> Hector
>
>
> On Fri, Dec 18, 2009 at 3:57 PM, monk.e.boy <john@teethgrinder.co.uk>
> wrote:
>
>>
>> Hi,
>>
>> I think I am being a bit thick, but I have read and googled and I am
>> still
>> stuck.
>>
>> I can't access my model classes with short names, I need to use:
>>
>> $test = new Default_Model_DbTable_Test();
>> $select = $test->select()->where('id=?', (int)$id);
>> $t = $test->fetchRow($select);
>>
>> $select = $test->select()->order('order ASC');
>> $this->view->sections =
>> $t->findDependentRowset('Default_Model_DbTable_Children', 'Test',
>> $select);
>>
>> How can I use short model class names?
>>
>> Thanks,
>>
>> monk.e.boy
>> --
>> View this message in context:
>> http://n4.nabble.com/model-autoloader-tp975174p975174.html
>> Sent from the Zend DB mailing list archive at Nabble.com.
>>
>>
>
>
View this message in context: http://n4.nabble.com/model-autoloader-tp975174p975181.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论