| 1 | <?php |
||
| 2 | class Category extends AppModel { |
||
|
|
|||
| 3 | |||
| 4 | public $belongsTo = array( |
||
| 5 | 'ParentCategory' => array( |
||
| 6 | 'className' => 'Category', |
||
| 7 | 'foreignKey' => 'parent_id', |
||
| 8 | ), |
||
| 9 | ); |
||
| 10 | |||
| 11 | public $hasAndBelongsToMany = array('Article'); |
||
| 12 | |||
| 13 | /** |
||
| 14 | * {@inheritDoc} |
||
| 15 | */ |
||
| 16 | public function __construct($id = false, $table = null, $ds = null) { |
||
| 20 | } |
||
| 21 |
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.