예제 #1
0
 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();
 }
예제 #2
0
 function __construct()
 {
     $this->pollRepository = RepositoryFactory::pollRepository();
 }
예제 #3
0
파일: init.php 프로젝트: blr21560/framadate
 */
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';