/var/www/(Del)gepgroup.hk/php-activerecord/test/helpers/foo.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

namespace foo\bar\biz;

class 
User extends \ActiveRecord\Model {
    static 
$has_many = array(
        array(
'user_newsletters'),
        array(
'newsletters''through' => 'user_newsletters')
    );

}

class 
Newsletter extends \ActiveRecord\Model {
    static 
$has_many = array(
        array(
'user_newsletters'),
        array(
'users''through' => 'user_newsletters'),
    );
}

class 
UserNewsletter extends \ActiveRecord\Model {
    static 
$belong_to = array(
        array(
'user'),
        array(
'newsletter'),
    );
}

# vim: ts=4 noet nobinary
?>