[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-general
Subject: Re: [PEAR] Links inside DataObject
From: 83.97.160.89
Date: 2005-06-28 18:23:12
Message-ID: 0A.BD.00424.F8391C24 () pb1 ! pair ! com
[Download RAW message or body]
Justin Patrin wrote:
> On 6/28/05, Rodrigo Alvarez <papipo@gmail.com> wrote:
>
>>is there any way of specifying dataobject links from within the
>>dataobject itself? This should be like Frombuilder style:
>>
>>i want something like that $fb_textFields to specify DO links, instead
>>of .ini file, since its use is not possible atm:
>
>
> Use of an ini file is not possible? I don't understand how that can be.
hehe. I'm developing a Framework that has some "core" content types. New
content types would be added, but their links shouldn't go into the main
links.ini file.
>
> You can set both the table info (columns and types) and link data by
> overriding functions in yoru DOs. Someone (don't remember who) altered
> the generator to do this but I don't think the code was ever cimitted
> to DB_DO.
>
> class MyDO extends DB_DataObject {
> //...
> function table() {
> return array('field1' => DB_DATAOBJECT_INT, 'field2' => DB_DATAOBJECT_STR);
> }
> function links() {
> return array('field1' => 'table:field');
> }
> }
>
Ok, I'll try this, thanks.
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic