/** * Constructeur * @param array $config */ function __construct(array $config = array()) { // Initialise la configuration, si elle existe if (isset($config['orm'])) { self::$config = array_merge(self::$config, $config['orm']); } // Premier chargement de L'ORM if (self::$CI === NULL) { // Charge l'instance de CodeIgniter self::$CI =& get_instance(); // Charge le fichier langue self::$CI->load->language('orm'); // Si la clé de cryptage est vide, on désactive le cryptage if (self::$config['encryption_enable'] && empty(self::$config['encryption_key'])) { self::$config['encryption_enable'] = FALSE; } // Charge l'autoloader de L'ORM if (self::$config['autoloadmodel']) { self::$CI->load->helper('orm'); } // Si le cryptage est actif charge les éléments indispensable au cryptage if (self::$config['encryption_enable']) { self::$CI->load->helper('string'); } } }