function __construct(FramaDB $connect, LogService $logService) { $this->logService = $logService; $this->pollRepository = RepositoryFactory::pollRepository(); $this->slotRepository = RepositoryFactory::slotRepository(); $this->voteRepository = RepositoryFactory::voteRepository(); $this->commentRepository = RepositoryFactory::commentRepository(); }
function __construct() { $this->pollRepository = RepositoryFactory::pollRepository(); }
*/ use Framadate\FramaDB; use Framadate\Repositories\RepositoryFactory; // Autoloading of dependencies with Composer require_once __DIR__ . '/../../vendor/autoload.php'; require_once __DIR__ . '/../../vendor/o80/i18n/src/shortcuts.php'; if (session_id() == '') { session_start(); } if (ini_get('date.timezone') == '') { date_default_timezone_set('Europe/Paris'); } define('ROOT_DIR', __DIR__ . '/../../'); define('CONF_FILENAME', ROOT_DIR . '/app/inc/config.php'); if (is_file(CONF_FILENAME)) { require_once __DIR__ . '/constants.php'; @(include_once __DIR__ . '/config.php'); // Connection to database $connect = new FramaDB(DB_CONNECTION_STRING, DB_USER, DB_PASSWORD); RepositoryFactory::init($connect); $err = 0; } else { define('NOMAPPLICATION', 'Framadate'); define('DEFAULT_LANGUAGE', 'fr'); define('IMAGE_TITRE', 'images/logo-framadate.png'); define('LOG_FILE', 'admin/stdout.log'); $ALLOWED_LANGUAGES = ['fr' => 'Français', 'en' => 'English', 'es' => 'Español', 'de' => 'Deutsch', 'it' => 'Italiano']; } require_once __DIR__ . '/i18n.php'; // Smarty require_once __DIR__ . '/smarty.php';