You may check out whether the behavior features in Doctrine may serve
you for your need:
- use the Searchable behavior/template provided by Doctrine, or
- develop your own Doctrine behavior that suits your exact needs

For the latter, refer to
 
http://www.symfony-project.org/more-with-symfony/1_4/en/08-Advanced-Doctrine-Usage

If I understand you correctly: yes there is not sort of "BaseTable"
class that is between a generated MyClassTable and Doctrine_Table.
That could probably help for your need, but as above-mentioned there
are behaviors available instead that can be hooked onto the Doctrine
table/record classes for any entity that you wish to enhance with your
search functionality.

Hope that helps, RAPHAEL



On 3 Sep., 05:54, "Sebastien Armand [Pink]" <[email protected]> wrote:
> Hello everyone,
>
> I have a few classes of my model on top of which I wanted to add search
> capabilities through their 'Table' classes.
> After realizing that many functions I'm gonna create here will be similar
> from one Table class to the other I wanted to refactor all of this in one
> common place.
> So at first I started creating an abstract Search Class thinking that I
> would use my Table class and create a new one that extends both the Table
> and the Search class into a SearchableTable class.
> So if we think about Jobeet jobs I would have a new JobSearchableTable
> class.
>
> Of course multiple inheritance does not work! And I'm not interested in
> creating interfaces, cause I actually want those common search methods
> implemented somewhere.
>
> Right now what I am doing is that the Search class extends Doctrine_Table,
> and then I changed my Table class so it extends my new class. And everything
> seems good like that.
>
> However this only works because the Table classes directly extend
> Doctrine_Table. But if I wanted to have the same kind of ability on the
> model classes themselves I would be completely screwed because they extend
> the "base" classes which then extend Doctrine_Record. Or would there be a
> way to do something about that?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to