I'm working on modeling Roles in Contexts with PHP, using Doctrine. It is 
inspired by DCI (Data-Context-Interaction), see 

http://fulloo.info/Documents/ 
<https://groups.google.com/forum/#%21forum/object-composition>
 <https://github.com/HermanPeeren/dci-lab/#hp-experiments>Some libraries 
using DCI in PHP:


   - *Fatty*: originally for Laravel. Uses closure object binding (in PHP 
   5.4). See http://kirkbushell.me/data-context-interaction-for-php/. Code 
   on https://github.com/kirkbushell/fatty.
   - *CoreDCI*: can be used in PHP 5.3 (no traits). A method-injection 
   PHP-implementation from 2010 using naming conventions like r 
*Rolename*Actions-classes. Used in 
   http://code.google.com/p/waxphp/. See 
   http://code.google.com/p/php-coredci/wiki/UsingCoreDCI

There are more people working on DCI-implementations at the moment. The 
*Contextual 
Encapsulation* implementation I'm working on is not "pure" DCI. In fact it 
is what the "core"DCI developers call a "wrapper" solution, that would lead 
to object schizophrenia. I am however working on practical application of 
my ideas and a good formalisation. My ideas are similar to ObjectTeams in 
Java, see a.o. http://wiki.eclipse.org/Object_Teams_Quick-Start and 
https://www.eclipse.org/objectteams/ . Want to publish more about it the 
coming months (and let you know). 

Herman Peeren

On Monday, 13 January 2014 17:05:23 UTC+1, geoffroy cochard wrote:
>
> Hie,
>
> I would like to use inheritance in my project to do this :
>
>
>    - Class *Person*
>    - Class *Employee* extends *Person*
>    - Class *Trainer* extends *Person*
>    - Class *Learner* extends *Person*
>    
> But *Person* could be an *Employee* *AND* *Trainer*  not only *OR.*
>
> If i follow the SINGLE_TABLE or JOINED inheritance mapping, i've to use an 
> discriminator column and mapping to do inheritance and i can do only a 
> Trainer or Employee or Learner with this system.
> I would like to work with flag : Employee (employee_flg = true), Trainer 
> (trainer_flg = true), Learner (learner_flg = true).
>
> I've done this with sf1/dc1 project with a column aggregation width 
> keyField / keyValue
>
> What do you think about ?
>
> Geoffroy
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to