/** * Constructor * * Sets all the session connection driver options. The available options * are: * - path string session storage path; * - extension string session file extension; * * @param AeArray $options */ public function __construct(AeArray $options = null) { if (isset($options['path']) && file_exists((string) $options['path'])) { $this->_storagePath = (string) $options['path']; } else { $this->_storagePath = getcwd() . SLASH . 'sessions'; } if (isset($options['extension'])) { $this->_extension = (string) $options['extension']; } else { $this->_extension = 'sess'; } parent::__construct($options); }
/** * Constructor * * Database storage driver accepts the following options: * - table string the table name to be used as the storage table for * sessions. The target table should meet several simple * requirements, which are described in the {@link * AeSession_Driver_Database class documentation}; * - connection array connection options array. See below for detailed * description. * * To use this session handler, you must provide sufficient data to * establish a database connection. There are several sets of data, any of * which is sufficient: * - name, settings: parameters to be passed to {@link * AeDatabase::getConnection()} method. See the method * documentation for more details; * - driver, username, password, options: parameters to be passed to {@link * AeDatabase::getInstance()} method. * See the method documentation for * more details; * - callback: an instance of the {@link AeCallback} class, specifying which * method should be called to get the active database connection. * The return value of the method must be an implementation of * the {@link AeInterface_Database} class; * - connection: an instance of the {@link AeInterface_Database} object. * * @param AeArray $options */ public function __construct(AeArray $options = null) { if (isset($options['table'])) { $this->_storageTable = (string) $options['table']; } else { $this->_storageTable = '#__session'; } if (isset($options['connection'])) { if ($options['connection'] instanceof AeInterface_Database) { $this->_connection = $options['connection']; } else { $this->_options = $options['connection']; } } parent::__construct($options); }