1 | <?php |
||
2 | class Apple extends AppModel { |
||
|
|||
3 | |||
4 | public $belongsTo = array( |
||
5 | 'ParentApple' => array( |
||
6 | 'className' => 'Apple', |
||
7 | 'foreignKey' => 'apple_id' |
||
8 | ) |
||
9 | ); |
||
10 | |||
11 | public $hasOne = array( |
||
12 | 'SampleA' => array( |
||
13 | 'className' => 'Sample', |
||
14 | 'conditions' => array( |
||
15 | 'SampleA.id' => 1, |
||
16 | ), |
||
17 | 'external' => true, |
||
18 | ), |
||
19 | ); |
||
20 | |||
21 | public $hasMany = array( |
||
22 | 'Sample' |
||
23 | ); |
||
24 | |||
25 | /** |
||
26 | * Constructor |
||
27 | * |
||
28 | * @param mixed $id ID |
||
29 | * @param string $table Table |
||
30 | * @param string $ds DataSource |
||
31 | */ |
||
32 | public function __construct($id = false, $table = null, $ds = null) { |
||
41 | |||
42 | /** |
||
43 | * Finder query for NextApple |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getNextAppleFinderQuery() { |
||
63 | } |
||
64 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.