Ok. I've read it (maybe i should have done this before).

I'm non english, and I'm little bit confused about the mapMethods
array. Am I right that you can "share" methods beteween models?
The way

var $mapMethods =
array('/Model1/method_to_sahre'=>'behavior_method_name');

and you can access it in the controller of Model2 by
$this->Model2->behavior_method_name() ?

-----
Beyond explaining me the functionality of behaviours (thanks for
that!), is there a possibility to write something like "components"
only for models? (Thats what I expected from "behaviours")

I would like to use some methods in some models, but not in all.

What I exactly want do, is extending the model by a set of methods so
it can handle Nested-Set-Tables (like in Aco/Aro tables with lft and
rgt) with the normal Model-API (following Cake Conventions). I don't
want to write it in the AppModel, because i don't want to use these
functions on all models.

Until now, I have a extra NestedSet-Model which extends AppModel and
evry other model which I want to to use on a NestedSet-table extends
the NestedSet-Model (as shown below), but this breaks bake.php
recognizing my "enhanced Model"!

class AppModel extends Model {
 // app-wide functions
}

class NestedSetModel extends AppModel {
 // nested set feature functions
}

class ForumModel extends NestedSetModel {
 // functionality only for forum (Forum is only a example)
}

And I really want to know how to get rid of (place it elsewhere) the
"NestedSetModel" between ForumModel and AppModel. By definition it is
no Model on its own, it only provides functionality to other models and
therefore it should not be located in /app/models.

Sincerly, Flo
PS: Thanks for the fast reply!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to