Я получил эту ошибку, когда попытался интегрировать плагины для диаграмм. Плагины, которые я нашел онлайн, предназначены для тортов версии 2. *. Я пытаюсь сделать то же самое для 3.0 и получил эту ошибку. Вот мой код. Я также пробовал высокие графики и получил то же самое.Cakephp 3.0 Class 'App Controller App' не найдена ошибка
use App\Controller\AppController;
App::uses('AppController', 'Controller');
App::uses('GoogleCharts', 'GoogleCharts.Lib');
class ChartsController extends AppController {
public $helpers = array('GoogleCharts.GoogleCharts');
//Setup data for chart
public function index() {
$chart = new GoogleCharts();
$chart->type("LineChart");
//Options array holds all options for Chart API
$chart->options(array('title' => "Recent Scores"));
$chart->columns(array(
//Each column key should correspond to a field in your data array
'event_date' => array(
//Tells the chart what type of data this is
'type' => 'string',
//The chart label for this column
'label' => 'Date'
),
'score' => array(
'type' => 'number',
'label' => 'Score',
//Optional NumberFormat pattern
'format' => '#,###'
)
));
//You can also manually add rows:
$chart->addRow(array('event_date' => '1/1/2012', 'score' => 55));
//Set the chart for your view
$this->set(compact('chart'));
}
}
Почему официальные документы в документации отсутствуют? –
@przemo_li Отсутствует _what_? – ndm
правильное использование и пространство имен в примерах кода: D (особенно если кто-то устанавливает из композитора) –