Compréhension du squelette de base de Phalcon
Il est très important de bien comprendre le squelette de base de Phalcon pour pouvoir l’utiliser correctement.
1. Configuration
Tout projet commence par une bonne configuration. Le fichier de configuration principal se trouve dans app/config/config.php.
<?php
/*
* Modified: prepend directory path of current file, because of
this file own different ENV under between Apache and command line.
* NOTE: please remove this comment.
*/
defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH')
?: realpath(dirname(__FILE__) . '/../..'));
defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app');
return new \Phalcon\Config([
'database' => [
'adapter' => 'Mysql',
'host' => 'localhost',
'username' => 'root',
'password' => '',
'dbname' => 'test',
'charset' => 'utf8',
],
'application' => [
'appDir' =>...