<?php
namespace Avision;

class Avision_Main {
    private $assets;
    private $i18n;
    private $database;
    private $api;

    public function __construct() {
        $this->load_dependencies();
    }

    private function load_dependencies() {
        $this->assets = new Avision_Assets();
        $this->i18n = new Avision_I18n();
        $this->database = new Avision_Database();
        $this->api = new Avision_API();
    }

    public function run() {
        $this->i18n->init();
        $this->assets->init();
        $this->database->init();
        $this->api->init();
    }

    public function get_assets() {
        return $this->assets;
    }

    public function get_i18n() {
        return $this->i18n;
    }

    public function get_database() {
        return $this->database;
    }

    public function get_api() {
        return $this->api;
    }
}
