У меня есть Cart.php, он должен вызывать функцию Model
Но я пытаюсь в моем Cart.php
app:import('model','Product')
Это не работа: (
спасибо
cart.php - класс корзины покупок, он может обрабатывать покупки, всего ... Класс My cart.php - следующий код:
<?php
class Cart_Dao {
public function find($key){
return array();
}
public function findAll($keyList){
}
}
?>
<?
include 'Cart_Dao.php';
class Cart_Dao_Product extends Cart_Dao{
var $uses = array('Product');
public function find($key){
$this->load('Product');
return $this->Product->find('all',array('conditions'=> array('Product.id'=>$key ))); // I Can't any cakephp Model function in Here
}
public function findAll($keyList) {
$this->load('Product');
return $this->Product->find('all',array('conditions'=> array('Product.id'=>$keyList ))); // I Can't any cakephp Model function in Here
}
}
?>