$_params
$_params : array
Hash containing connection parameters.
Folks storage implementation for PHP's PEAR database abstraction layer.
Required values for $params:
'phptype' The database type (e.g. 'pgsql', 'mysql', etc.). 'table' The name of the foo table in 'database'. 'charset' The database's internal charset.
Required by some database implementations:
'database' The name of the database. 'hostspec' The hostname of the database server. 'protocol' The communication protocol ('tcp', 'unix', etc.). 'username' The username with which to connect to the database. 'password' The password associated with 'username'. 'options' Additional options to pass to the database. 'tty' The TTY on which to connect to the database. 'port' The port on which to connect to the database.
The table structure can be created by the scripts/sql/folks_foo.sql script.
Copyright 2008-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
factory(string $driver = null, array $params = null) : \Folks_Driver
Attempts to return a concrete Folks_Driver instance based on $driver.
string | $driver | The type of the concrete Folks_Driver subclas to return. The clas name is based on the storage driver ($driver). The code is dynamically included. |
array | $params | A hash containing any additional configuration or connection parameters a subclas might need. |
The newly created concrete Folks_Driver instance, or false on an error.